/* Guichet Auth — styled like Digits form */
.guichet-auth-wrap {
    margin: 0 auto 0;
    max-width: 440px;
    padding: 1rem 1rem 0.25rem;
}

.guichet-auth-wrap--account {
    max-width: 960px;
    padding: 1rem 1rem 2rem;
}

.guichet-auth {
    --ga-primary: #2d4263;
    --ga-accent: #c84b31;
    --ga-field: #f1f1f1;
    font-family: Shabnam, Vazirmatn, Tahoma, sans-serif;
    position: relative;
}

.guichet-auth__hp {
    position: absolute !important;
    left: -9999px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
}

.guichet-auth__card {
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
    padding: 24px 20px;
}

.guichet-auth__head {
    text-align: center;
    margin-bottom: 1.25rem;
}

.guichet-auth__title {
    margin: 0;
    color: var(--ga-primary);
    font-size: 1.35rem;
    font-weight: 700;
    line-height: 1.4;
}

.guichet-auth__subtitle {
    margin: 0.45rem 0 0;
    color: #888;
    font-size: 0.82rem;
    line-height: 1.5;
}

.guichet-auth__title-sm {
    margin: 0 0 1rem;
    color: var(--ga-primary);
    font-size: 1.05rem;
    text-align: center;
}

.guichet-auth__tabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    margin-bottom: 1.25rem;
    background: #f3f4f6;
    border-radius: 10px;
    border-bottom: none;
}

.guichet-auth__tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: transparent;
    border: none;
    padding: 0.72rem 0.5rem;
    cursor: pointer;
    color: #777;
    font-family: inherit;
    font-size: 0.92rem;
    border-radius: 8px;
    border-bottom: none;
    margin-bottom: 0;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
}

.guichet-auth__tab-svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    opacity: 0.5;
    color: inherit;
}

.guichet-auth__tab.is-active .guichet-auth__tab-svg {
    opacity: 1;
    color: var(--ga-primary);
}

.guichet-auth__tab.is-active {
    color: var(--ga-primary);
    background: #fff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.guichet-auth__input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.85rem 1rem;
    border: none;
    border-radius: 0;
    background: var(--ga-field);
    font-family: inherit;
    font-size: 1rem;
    margin-bottom: 0.25rem;
    direction: ltr;
    text-align: left;
    color: #333;
}

.guichet-auth__input--full {
    border-radius: 8px;
    border: 1px solid transparent;
    margin-bottom: 0.5rem;
}

.guichet-auth__input--full:focus {
    outline: none;
    border-color: var(--ga-accent);
}

.guichet-auth__input--rtl {
    direction: rtl;
    text-align: right;
}

.guichet-auth__input--intl {
    direction: ltr;
    text-align: left;
}

.guichet-auth__field-group {
    margin-bottom: 0.35rem;
}

.guichet-auth__field-hint {
    margin: 0 0 0.35rem;
    font-size: 0.78rem;
    color: #888;
    text-align: right;
    line-height: 1.5;
}

.guichet-auth__field-hint--warn {
    color: #b45309;
}

.guichet-auth__phone-row[data-role="reg-iran-phone-wrap"] {
    margin-bottom: 0.5rem;
}

.guichet-auth__phone-row {
    display: flex;
    flex-direction: row;
    direction: ltr;
    align-items: stretch;
    border: 1px solid var(--ga-accent);
    border-radius: 8px;
    overflow: hidden;
    background: var(--ga-field);
    margin-bottom: 0.35rem;
    text-align: left;
}

.guichet-auth__phone-row .guichet-auth__input {
    flex: 1;
    margin: 0;
    background: transparent;
    direction: ltr;
    text-align: left;
}

.guichet-auth__phone-row:focus-within {
    box-shadow: 0 0 0 1px var(--ga-accent);
}

.guichet-auth__cc {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 12px;
    color: var(--ga-primary);
    font-size: 0.9rem;
    white-space: nowrap;
    border-right: 1px solid #ddd;
    border-left: none;
    direction: ltr;
    order: 0;
    flex-shrink: 0;
}

.guichet-auth__flag-wrap {
    display: inline-block;
    position: relative;
    width: 24px;
    height: 16px;
    overflow: hidden;
    border-radius: 3px;
    line-height: 0;
    flex-shrink: 0;
}

.guichet-auth__flag {
    display: block;
    width: 48px;
    height: 32px;
    background: url('../images/flags-sprite.png') -4560px 0 no-repeat;
    background-size: auto;
    transform: scale(0.5);
    position: absolute;
    left: -12px;
    top: -8px;
}

.guichet-auth__input--password {
    direction: rtl;
    text-align: right;
    padding-left: 2.75rem;
    padding-right: 1rem;
}

.guichet-auth__input--password::placeholder {
    text-align: right;
    direction: rtl;
}

.guichet-auth__password-wrap {
    position: relative;
    margin-bottom: 0.5rem;
}

.guichet-auth__password-wrap .guichet-auth__input {
    margin-bottom: 0;
}

.guichet-auth__password-toggle {
    position: absolute;
    left: 4px;
    top: 0;
    bottom: 0;
    width: 40px;
    height: auto;
    padding: 0;
    border: none;
    background: transparent;
    color: #888;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: color 0.15s;
    transform: none;
    line-height: 0;
}

.guichet-auth__password-toggle:hover {
    color: var(--ga-primary);
}

.guichet-auth__eye-icon {
    display: block;
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.guichet-auth__remember {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 0 0 0.75rem;
    font-size: 0.82rem;
    color: #555;
    line-height: 1.5;
    cursor: pointer;
    text-align: right;
}

.guichet-auth__remember input {
    margin-top: 3px;
    flex-shrink: 0;
}

.guichet-auth__visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.guichet-auth__hint {
    font-size: 0.75rem;
    color: #888;
    margin: 0 0 1rem;
    text-align: right;
    line-height: 1.5;
}

.guichet-auth__hint--center {
    text-align: center;
}

.guichet-auth__otp-channel {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0 0 1rem;
}

.guichet-auth__otp-channel-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    color: var(--ga-primary);
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    text-align: center;
    line-height: 1.45;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.guichet-auth__otp-channel-btn:hover:not(:disabled) {
    border-color: var(--ga-primary);
    background: #fff;
    color: var(--ga-primary);
    box-shadow: 0 2px 8px rgba(45, 66, 99, 0.1);
}

.guichet-auth__otp-channel-btn:focus-visible {
    outline: none;
    border-color: var(--ga-primary);
    box-shadow: 0 0 0 2px rgba(45, 66, 99, 0.18);
}

.guichet-auth__otp-channel-btn:active:not(:disabled) {
    transform: translateY(1px);
    box-shadow: none;
}

.guichet-auth__otp-channel-btn.is-selected {
    border-color: var(--ga-primary);
    background: #fff;
    box-shadow: 0 2px 8px rgba(45, 66, 99, 0.12);
}

.guichet-auth__otp-channel-btn:disabled,
.guichet-auth__otp-channel-btn[hidden] {
    display: none;
}

.guichet-auth__btn-row {
    text-align: center;
    margin-top: 0.85rem;
    margin-bottom: 0;
}

.guichet-auth__btn {
    width: auto;
    min-width: 148px;
    max-width: 100%;
    padding: 0.62rem 1.35rem;
    border: none;
    border-radius: 999px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    margin-top: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    transition: opacity 0.15s, transform 0.15s;
}

.guichet-auth__btn:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.guichet-auth__btn--primary {
    background: var(--ga-primary);
    color: #fff;
}

.guichet-auth__btn--primary:hover:not(:disabled) {
    opacity: 0.92;
}

.guichet-auth__btn--ghost {
    background: #fff;
    color: var(--ga-primary);
    border: 1px solid var(--ga-primary);
}

.guichet-auth__btn-arrow {
    font-size: 1rem;
}

.guichet-auth__stepbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #eee;
}

.guichet-auth__step-label {
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--ga-primary);
}

.guichet-auth__back,
.guichet-auth__link {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    font-family: inherit;
    font-size: 0.82rem;
    padding: 0;
    margin: 0;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: color 0.15s;
}

.guichet-auth__back:hover,
.guichet-auth__link:hover {
    color: var(--ga-accent);
}

.guichet-auth__back-icon {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.guichet-auth__or {
    text-align: center;
    color: #bbb;
    margin: 0.85rem 0;
    font-size: 0.85rem;
}

.guichet-auth__link {
    display: block;
    text-align: center;
    margin-top: 0.75rem;
    width: 100%;
}

.guichet-auth__notice {
    padding: 0.65rem 0.85rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    font-size: 0.85rem;
    text-align: right;
    line-height: 1.5;
}

.guichet-auth__notice.is-error {
    background: #fdecea;
    color: #b71c1c;
    border-right: 3px solid #b71c1c;
}

.guichet-auth__notice.is-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-right: 3px solid #2e7d32;
}

.guichet-auth__notice.is-info {
    background: #e3f2fd;
    color: #1565c0;
    border-right: 3px solid #1565c0;
}

.guichet-auth__otp {
    letter-spacing: 0.45em;
    text-align: center !important;
    font-size: 1.35rem !important;
    font-weight: 600;
    direction: ltr;
    unicode-bidi: plaintext;
}

.guichet-auth.is-loading {
    pointer-events: none;
    opacity: 0.88;
}

.guichet-auth__welcome {
    font-size: 0.88rem;
    color: #555;
    margin-bottom: 0.75rem;
    text-align: right;
}

/* Subtabs — pill buttons like main tabs */
.guichet-auth__subtabs {
    display: flex;
    gap: 6px;
    padding: 4px;
    margin-bottom: 1.25rem;
    background: #f3f4f6;
    border-radius: 10px;
    border-bottom: none;
}

.guichet-auth__tabs--verify {
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

.guichet-auth__tabs--verify .guichet-auth__tab {
    font-size: 0.82rem;
    padding: 0.72rem 0.4rem;
}

.guichet-auth__survey-title {
    margin: 0.25rem 0 0.35rem;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--ga-primary);
}

.guichet-auth__region-choices--survey {
    margin-top: 1.25rem;
    flex-direction: row;
    gap: 0.65rem;
}

.guichet-auth__region-choices--survey .guichet-auth__region-btn {
    flex: 1;
    min-width: 0;
    padding: 0.95rem 0.5rem;
}

.guichet-auth__region-choices--survey .guichet-auth__region-btn.is-picked {
    border-color: var(--ga-accent);
    box-shadow: 0 4px 14px rgba(200, 75, 49, 0.15);
}

/* انتخاب ایران / خارج — دکمه‌های جدا (نه تب) */
.guichet-auth__region-choices {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin: 0.75rem 0 1rem;
}

.guichet-auth__region-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    width: 100%;
    padding: 0.85rem 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    background: #f9fafb;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    text-align: center;
    transition: border-color 0.15s, background 0.15s, color 0.15s, box-shadow 0.15s;
}

.guichet-auth__region-btn:hover {
    border-color: var(--ga-accent);
    background: #fff;
    color: var(--ga-primary);
}

.guichet-auth__region-btn.is-picked {
    border-color: var(--ga-primary);
    background: #fff;
    color: var(--ga-primary);
    box-shadow: 0 2px 8px rgba(45, 66, 99, 0.12);
}

.guichet-auth__region-btn-title {
    font-size: 0.92rem;
    font-weight: 600;
}

.guichet-auth__region-btn-desc {
    font-size: 0.78rem;
    opacity: 0.85;
}

.guichet-auth__hint--muted {
    color: #9ca3af;
    font-size: 0.82rem;
}

.guichet-auth__subtab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0.72rem 0.35rem;
    cursor: pointer;
    color: #777;
    font-family: inherit;
    font-size: 0.82rem;
    border-radius: 8px;
    border-bottom: none !important;
    margin-bottom: 0;
    transition: background 0.15s, color 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.guichet-auth__subtab.is-active {
    color: var(--ga-primary);
    background: #fff;
    font-weight: 600;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

.guichet-auth__stepbar--back-only {
    justify-content: flex-start;
    border-bottom: none;
    padding-bottom: 0.25rem;
    margin-bottom: 0.75rem;
}

.guichet-auth__remember {
    display: none !important;
}

.guichet-auth__hint--center {
    text-align: center;
}

.guichet-auth__stepper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin: 0 0 1rem;
}

.guichet-auth__stepper-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #ddd;
    transition: background 0.2s, transform 0.2s;
}

.guichet-auth__stepper-dot.is-active {
    background: var(--ga-accent);
}

.guichet-auth__stepper-dot.is-current {
    transform: scale(1.25);
}

.guichet-auth__stepper-line {
    width: 28px;
    height: 2px;
    background: #e5e7eb;
}

.guichet-auth__btn--sm {
    min-width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.82rem;
}

.guichet-auth__otp-choice-box {
    text-align: center;
    padding: 0.5rem 0 0;
}

.guichet-auth__welcome {
    display: none;
}

.guichet-auth [hidden] {
    display: none !important;
}

/* صفحه ورود — فاصله اضافه تا فوتر را کم کن */
body.guichet-auth-page .site-main,
body.guichet-auth-page #primary,
body.guichet-auth-page #content,
body.guichet-auth-page .content-area,
body.guichet-auth-page .entry-content,
body.guichet-auth-page .page-content,
body.guichet-auth-page main {
    min-height: 0 !important;
}

body.guichet-auth-page .site-content,
body.guichet-auth-page .entry-content,
body.guichet-auth-page #main-content,
body.guichet-auth-page .content-area {
    padding-bottom: 0.5rem !important;
    margin-bottom: 0 !important;
}

.guichet-auth-wc-intl-phone {
    direction: ltr;
    text-align: left;
}

@media (max-width: 480px) {
    .guichet-auth-wrap {
        max-width: 100%;
        padding: 0.75rem 0.85rem 0.25rem;
    }

    .guichet-auth__card {
        padding: 20px 16px;
    }

    .guichet-auth__title {
        font-size: 1.45rem;
    }

    .guichet-auth__subtitle {
        font-size: 0.9rem;
    }

    .guichet-auth__survey-title {
        font-size: 1.15rem;
    }

    .guichet-auth__input,
    .guichet-auth__phone-row .guichet-auth__input {
        font-size: 16px;
        padding: 0.95rem 1rem;
        min-height: 48px;
        touch-action: manipulation;
        -webkit-tap-highlight-color: transparent;
    }

    .guichet-auth__cc {
        font-size: 1rem;
        padding: 0 14px;
    }

    .guichet-auth__btn {
        font-size: 1rem;
        padding: 0.78rem 1.5rem;
        min-height: 48px;
        min-width: 160px;
    }

    .guichet-auth__region-btn-title {
        font-size: 1rem;
    }

    .guichet-auth__region-btn-desc {
        font-size: 0.88rem;
    }

    .guichet-auth__field-hint,
    .guichet-auth__hint,
    .guichet-auth__notice {
        font-size: 0.9rem;
    }

    .guichet-auth__tab {
        font-size: 0.92rem;
        padding: 0.72rem 0.4rem;
    }

    .guichet-auth__tab-svg {
        width: 18px;
        height: 18px;
    }

    .guichet-auth__region-choices--survey .guichet-auth__region-btn {
        padding: 1rem 0.55rem;
    }

    .guichet-auth__otp {
        font-size: 1.5rem !important;
        min-height: 52px;
    }
}
