@font-face {
    font-family: "PeydaPublic";
    src: url("../fonts/public-site/peyda/peyda-400.woff2") format("woff2");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PeydaPublic";
    src: url("../fonts/public-site/peyda/peyda-500.woff2") format("woff2");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "PeydaPublic";
    src: url("../fonts/public-site/peyda/peyda-600.woff2") format("woff2");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}

.public-auth-modal,
.public-auth-modal button,
.public-auth-modal input,
.public-auth-modal select,
.public-auth-page,
.public-auth-page button,
.public-auth-page input,
.public-auth-page select {
    font-family: "PeydaPublic", Tahoma, sans-serif !important;
}

.public-auth-modal {
    --public-auth-primary: #0f98bc;
    --public-auth-text: #222;
    --public-auth-muted: rgba(34, 34, 34, 0.64);
    z-index: 1090;
}

.public-auth-modal + .modal-backdrop,
.modal-backdrop.public-auth-backdrop {
    z-index: 1085;
}

.public-auth-dialog {
    width: calc(100% - 1.5rem);
    max-width: 600px;
    margin-right: auto;
    margin-left: auto;
}

.public-auth-modal-content,
.public-auth-card {
    position: relative;
    overflow: hidden !important;
    border: 0;
    border-radius: 1rem !important;
    background: #fff;
    color: #222;
    box-shadow: 0 10px 38px -10px rgba(14, 22, 28, 0.35), 0 10px 20px -15px rgba(14, 22, 28, 0.2);
}

.public-auth-close {
    position: absolute;
    top: 1rem;
    left: 1rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #f5f5f5;
    color: #444;
}

.public-auth-content {
    max-height: 85vh;
    overflow-y: auto;
    overscroll-behavior: contain;
    padding: 2rem 3rem 3rem;
}

.public-auth-logo {
    display: block;
    width: 90px;
    height: 68px;
    margin: 0 auto 0.75rem;
    object-fit: contain;
    mix-blend-mode: multiply;
}

.public-auth-form {
    width: 100%;
}

.public-auth-form h2 {
    margin: 0;
    color: var(--public-auth-text, #222);
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.7;
}

.public-auth-description {
    margin: 0;
    padding-top: 0.25rem;
    color: var(--public-auth-muted, rgba(34, 34, 34, 0.64));
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.8;
}

.public-auth-description strong {
    color: var(--public-auth-text, #222);
    font-weight: 500;
}

.public-auth-form > label {
    display: block;
    margin: 0;
    padding-top: 0.75rem;
    color: var(--public-auth-text, #222);
    font-size: 0.9375rem;
    font-weight: 500;
}

.public-auth-form > label small {
    color: var(--public-auth-muted, rgba(34, 34, 34, 0.64));
    font-size: 0.75rem;
    font-weight: 400;
}

.public-auth-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding-top: 0.75rem;
}

.public-auth-fields-grid label {
    display: block;
    color: var(--public-auth-text, #222);
    font-size: 0.9375rem;
    font-weight: 500;
}

.public-auth-fields-grid .public-auth-input {
    margin-top: 0.25rem;
}

.public-auth-input {
    display: block;
    width: 100%;
    min-height: 48px;
    margin-top: 0.25rem;
    padding: 0.75rem;
    border: 1px solid #ccc;
    border-radius: 0.75rem;
    outline: 0;
    background: #fff;
    color: #222;
    font-size: 0.875rem;
    font-weight: 500;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.public-auth-input::placeholder {
    color: #999;
}

.public-auth-input:focus {
    border-color: var(--public-auth-primary, #0f98bc);
    box-shadow: 0 0 0 3px rgba(15, 152, 188, 0.12);
}

.public-auth-input.is-invalid {
    border-color: #ef4444;
}

.public-auth-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 40px;
    margin-top: 0.75rem;
    padding: 0.55rem 1rem;
    border: 0;
    border-radius: 1rem;
    background: var(--public-auth-primary, #0f98bc);
    color: #fff;
    font-size: 1rem;
    font-weight: 500;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.public-auth-primary:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.public-auth-primary:disabled {
    opacity: 0.55;
    pointer-events: none;
}

.public-auth-switch {
    display: block;
    width: max-content;
    margin: 0.8rem auto 0;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--public-auth-primary, #0f98bc);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: underline;
}

.public-auth-title-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-top: 0.75rem;
}

.public-auth-edit-phone {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--public-auth-primary, #0f98bc);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: underline;
}

.public-auth-status {
    margin: 0.45rem 0 0;
    color: #47836c;
    font-size: 0.75rem;
    line-height: 1.7;
}

.public-auth-error {
    margin: 0;
    padding-top: 0.3rem;
    color: #ef4444;
    font-size: 0.8125rem;
    line-height: 1.6;
}

.public-auth-error--center {
    text-align: center;
}

.public-auth-code-label {
    margin: 0;
    padding: 0.625rem 0 0.25rem;
    color: var(--public-auth-text, #222);
    font-size: 0.9375rem;
    font-weight: 500;
    text-align: center;
}

.public-auth-code {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
}

.public-auth-code input {
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid #999;
    border-radius: 0.75rem;
    outline: 0;
    background: #fff;
    color: #222;
    font-size: 1.125rem;
    font-weight: 600;
    text-align: center;
}

.public-auth-code input:focus {
    border-color: var(--public-auth-primary, #0f98bc);
    box-shadow: 0 0 0 3px rgba(15, 152, 188, 0.12);
}

.public-auth-resend {
    min-height: 44px;
    padding: 1rem 0 0.5rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 500;
}

.public-auth-resend b,
.public-auth-resend button {
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--public-auth-primary, #0f98bc);
    font-weight: 600;
}

.public-auth-rules {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0 0.25rem;
    margin: 0;
    padding-top: 0.875rem;
    color: #222;
    font-size: 0.8125rem;
    font-weight: 500;
    line-height: 1.8;
}

.public-auth-rules a,
.public-auth-secondary-links a,
.public-auth-secondary-links button {
    color: var(--public-auth-primary, #0f98bc) !important;
    text-decoration: underline;
}

.public-auth-password-wrap {
    position: relative;
}

.public-auth-password-wrap .public-auth-input {
    padding-left: 3rem;
}

.public-auth-password-wrap button {
    position: absolute;
    top: 50%;
    left: 0.85rem;
    display: inline-flex;
    padding: 0;
    border: 0;
    background: transparent;
    color: #777;
    transform: translateY(-42%);
}

.public-auth-secondary-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 0.75rem;
    padding-top: 0.85rem;
    font-size: 0.8125rem;
    font-weight: 600;
}

@media (max-width: 420px) {
    .public-auth-fields-grid {
        grid-template-columns: 1fr;
    }
}

.public-auth-secondary-links button {
    padding: 0;
    border: 0;
    background: transparent;
}

.public-auth-page {
    --public-auth-primary: #0f98bc;
    --public-auth-text: #222;
    --public-auth-muted: rgba(34, 34, 34, 0.64);
    min-height: 100vh;
    background: #f2ffff !important;
}

.public-auth-page-shell {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 1rem;
}

.public-auth-card {
    width: min(100%, 600px);
    padding: 2rem 3rem 3rem;
}

@media (max-width: 575.98px) {
    .public-auth-dialog {
        width: calc(100% - 1rem);
    }

    .public-auth-content,
    .public-auth-card {
        padding: 1.25rem 1rem 1.5rem;
    }

    .public-auth-close {
        top: 0.75rem;
        left: 0.75rem;
    }

    .public-auth-logo {
        margin-bottom: 0.5rem;
    }

    .public-auth-code input {
        width: 36px;
        height: 36px;
    }
}
