/**
 * MyTasbih — Authentication Experience
 * Premium split-panel layout for the Sign In / Register pages.
 *
 * Pairs with pro-account.css (which still supplies .form-input,
 * .account-submit, .account-message, .account-divider, .social-login-btn).
 * This file adds the surrounding "auth shell": a calm branded panel beside
 * a clean form column, plus password UX (show/hide + strength).
 *
 * @package MyTasbih Pro
 * @version 1.0.0
 */

/* ========================================
   Layout shell
   ======================================== */
.auth-section {
    padding: 32px 18px 56px;
}

.auth-shell {
    width: 100%;
    max-width: 940px;
    display: grid;
    grid-template-columns: 1.02fr 1fr;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(212, 175, 55, 0.18);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 24px 60px -24px rgba(26, 26, 46, 0.28);
}

.page-wrapper.dark .auth-shell {
    background: rgba(26, 26, 44, 0.92);
    border-color: rgba(224, 201, 127, 0.16);
    box-shadow: 0 24px 70px -28px rgba(0, 0, 0, 0.7);
}

/* ========================================
   Branded aside
   ======================================== */
.auth-aside {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    gap: 26px;
    padding: 44px 38px;
    color: #f3ecd9;
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(212, 175, 55, 0.22), transparent 60%),
        linear-gradient(160deg, #20203a 0%, #15152a 60%, #101022 100%);
}

/* Soft geometric ornament — calm, not flashy. */
.auth-aside::after {
    content: "";
    position: absolute;
    right: -70px;
    bottom: -70px;
    width: 240px;
    height: 240px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.18);
    box-shadow:
        0 0 0 26px rgba(212, 175, 55, 0.05),
        0 0 0 60px rgba(212, 175, 55, 0.03);
    pointer-events: none;
}

.auth-aside__top {
    position: relative;
    z-index: 1;
}

.auth-aside__brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 30px;
    text-decoration: none;
    color: #fff;
}

.auth-aside__brand img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
}

.auth-aside__brand span {
    font-family: 'Amiri', serif;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0.2px;
}

.auth-aside__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.4px;
    text-transform: uppercase;
    color: #e0c97f;
    margin-bottom: 14px;
}

.auth-aside__eyebrow svg {
    width: 14px;
    height: 14px;
    fill: #e0c97f;
}

.auth-aside__title {
    font-family: 'Amiri', serif;
    font-size: 27px;
    line-height: 1.25;
    font-weight: 700;
    margin: 0 0 12px;
    color: #fff;
}

.auth-aside__sub {
    font-size: 14.5px;
    line-height: 1.6;
    margin: 0;
    color: rgba(243, 236, 217, 0.82);
}

.auth-aside__list {
    position: relative;
    z-index: 1;
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.auth-aside__list li {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    font-size: 14px;
    line-height: 1.45;
    color: rgba(243, 236, 217, 0.92);
}

.auth-aside__list svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    margin-top: 1px;
    padding: 3px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.16);
    stroke: #e0c97f;
    stroke-width: 2.4;
    fill: none;
}

.auth-aside__foot {
    position: relative;
    z-index: 1;
    margin: auto 0 0;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    color: rgba(243, 236, 217, 0.7);
    padding-top: 20px;
    border-top: 1px solid rgba(243, 236, 217, 0.12);
}

.auth-aside__foot svg {
    width: 16px;
    height: 16px;
    fill: #e0c97f;
    flex-shrink: 0;
}

/* ========================================
   Form column
   ======================================== */
.auth-panel {
    padding: 44px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-panel .account-header {
    text-align: left;
    margin-bottom: 22px;
}

.auth-panel .account-header-icon {
    margin: 0 0 14px;
}

.auth-panel .account-header h2 {
    font-size: 28px;
}

/* Allow the primary action to render as a link (used on the checkout auth gate). */
a.account-submit {
    display: block;
    text-align: center;
    text-decoration: none;
}

/* Password field with show/hide toggle */
.form-field {
    position: relative;
    display: flex;
    align-items: center;
}

.form-field .form-input {
    width: 100%;
}

.form-input--with-toggle {
    padding-right: 46px;
}

.pw-toggle {
    position: absolute;
    right: 6px;
    top: 50%;
    transform: translateY(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #94a0b3;
    cursor: pointer;
    transition: color 0.15s, background 0.15s;
}

.pw-toggle:hover {
    color: var(--accent);
    background: rgba(212, 175, 55, 0.1);
}

.pw-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.pw-toggle .pw-toggle__off { display: none; }
.pw-toggle.is-on .pw-toggle__on { display: none; }
.pw-toggle.is-on .pw-toggle__off { display: block; }

/* Password strength meter (register) */
.pw-strength {
    margin-top: 9px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pw-strength__bar {
    flex: 1;
    height: 5px;
    border-radius: 99px;
    background: rgba(148, 160, 179, 0.2);
    overflow: hidden;
}

.pw-strength__bar i {
    display: block;
    height: 100%;
    width: 0;
    border-radius: 99px;
    background: #e2574c;
    transition: width 0.25s ease, background 0.25s ease;
}

.pw-strength__label {
    font-size: 11.5px;
    font-weight: 600;
    color: #94a0b3;
    min-width: 56px;
    text-align: right;
}

.pw-strength[data-level="1"] i { width: 28%;  background: #e2574c; }
.pw-strength[data-level="2"] i { width: 55%;  background: #e0a13a; }
.pw-strength[data-level="3"] i { width: 78%;  background: #c9a84c; }
.pw-strength[data-level="4"] i { width: 100%; background: #3aa76d; }

/* Inline field hint (e.g. password match) */
.field-hint {
    font-size: 12px;
    margin-top: 6px;
    min-height: 15px;
    color: #94a0b3;
}

.field-hint--ok { color: #3aa76d; }
.field-hint--err { color: #e2574c; }

/* Consent / remember rows replace the previous inline styles */
.form-check {
    display: flex;
    align-items: flex-start;
    gap: 9px;
}

.form-check input[type="checkbox"] {
    width: 17px;
    height: 17px;
    margin-top: 1px;
    flex-shrink: 0;
    accent-color: var(--accent);
    cursor: pointer;
}

.form-check label {
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    color: #64748b;
    cursor: pointer;
}

.page-wrapper.dark .form-check label {
    color: #9aa6b8;
}

.form-check a {
    color: var(--accent);
    text-decoration: none;
}

.form-check a:hover { text-decoration: underline; }

/* Bottom switch link (login <-> register) */
.auth-switch {
    margin: 22px 0 0;
    text-align: center;
    font-size: 13.5px;
    color: #64748b;
}

.page-wrapper.dark .auth-switch { color: #9aa6b8; }

.auth-switch a {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.auth-switch a:hover { text-decoration: underline; }

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 860px) {
    .auth-section {
        padding: 18px 14px 44px;
    }

    .auth-shell {
        grid-template-columns: 1fr;
        max-width: 460px;
        border-radius: 20px;
    }

    /* Collapse the aside into a compact branded banner above the form. */
    .auth-aside {
        gap: 14px;
        padding: 26px 26px 24px;
    }

    .auth-aside::after { display: none; }

    .auth-aside__brand { margin-bottom: 18px; }

    .auth-aside__title { font-size: 22px; }

    .auth-aside__sub { font-size: 13.5px; }

    /* Hide the longer value list on small screens to keep the form above the fold. */
    .auth-aside__list,
    .auth-aside__foot {
        display: none;
    }

    .auth-panel {
        padding: 30px 24px 34px;
    }

    .auth-panel .account-header h2 { font-size: 24px; }
}

@media (max-width: 400px) {
    .auth-aside { padding: 22px 20px; }
    .auth-panel { padding: 26px 20px 30px; }
}

/* ========================================
   RTL
   ======================================== */
[dir="rtl"] .auth-aside__list li,
[dir="rtl"] .auth-aside__foot,
[dir="rtl"] .auth-aside__eyebrow,
[dir="rtl"] .auth-aside__brand {
    flex-direction: row-reverse;
    text-align: right;
}

[dir="rtl"] .auth-panel .account-header { text-align: right; }

[dir="rtl"] .form-input--with-toggle {
    padding-right: 14px;
    padding-left: 46px;
}

[dir="rtl"] .pw-toggle {
    right: auto;
    left: 6px;
}

[dir="rtl"] .pw-strength__label { text-align: left; }
