/*
 * CHAMAELEONSTYLE – Account + Login
 * ==================================
 *
 * Dedicated styles for:
 * - /index.php?action=mylogin
 * - /index.php?action=myaccount
 *
 * Visual direction follows the current white / black / restrained-red shop.
 */

.cs-account-page,
.cs-login-page {
    width: min(100%, 1380px);
    margin: 0 auto;
    padding:
        clamp(26px, 4vw, 56px)
        var(--cs-page-padding)
        clamp(70px, 8vw, 120px);

    color: var(--cs-text);
}


/* ==========================================================================
   SHARED TYPOGRAPHY
   ========================================================================== */

.cs-account-kicker {
    display: block;

    margin-bottom: 7px;

    color: var(--cs-red);

    font-size: 10px;
    font-weight: 650;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.cs-account-page h1,
.cs-login-page h1 {
    margin: 0;

    color: var(--cs-brand-black);

    font-size: clamp(32px, 4vw, 52px);
    font-weight: 620;
    letter-spacing: -0.045em;
    line-height: 1.02;
}

.cs-account-page h2 {
    margin: 0;

    color: var(--cs-brand-black);

    font-size: clamp(21px, 2vw, 28px);
    font-weight: 600;
    letter-spacing: -0.025em;
}


/* ==========================================================================
   ACCOUNT HEADER
   ========================================================================== */

.cs-account-header {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 28px;

    margin-bottom: 28px;
    padding-bottom: 24px;

    border-bottom: 1px solid var(--cs-border);
}

.cs-account-header p {
    margin: 9px 0 0;

    color: var(--cs-muted);

    font-size: 13px;
}

.cs-account-header__actions {
    display: flex;
    flex-wrap: wrap;

    justify-content: flex-end;

    gap: 8px 20px;
}

.cs-account-link {
    color: var(--cs-brand-black);

    font-size: 12px;
    font-weight: 600;

    text-decoration: underline;
    text-decoration-color: #C8C8C4;
    text-underline-offset: 4px;
}

.cs-account-link:hover {
    color: var(--cs-red);
    text-decoration-color: var(--cs-red);
}


/* ==========================================================================
   MESSAGE
   ========================================================================== */

.cs-account-message {
    margin-bottom: 24px;
    padding: 14px 16px;

    border: 1px solid var(--cs-border);
    border-radius: 4px;

    font-size: 13px;
    line-height: 1.55;
}

.cs-account-message--success {
    background: #F2F8F3;
    border-color: #BFD8C4;
    color: #226332;
}

.cs-account-message--notice {
    background: #F7F7F5;
    color: var(--cs-text);
}

.cs-account-message--error {
    background: #FFF5F5;
    border-color: #E6BABA;
    color: #8A2626;
}


/* ==========================================================================
   IDENTITY STRIP
   ========================================================================== */

.cs-account-identity {
    display: grid;

    grid-template-columns:
        minmax(180px, 1fr)
        minmax(260px, 1.5fr)
        auto;

    align-items: center;

    gap: 24px;

    margin-bottom: 30px;
    padding: 18px 20px;

    background: #F7F7F5;

    border: 1px solid var(--cs-border);
    border-radius: 5px;
}

.cs-account-identity > div {
    display: grid;
    gap: 3px;
}

.cs-account-label {
    color: var(--cs-muted);

    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.cs-account-identity strong {
    overflow: hidden;

    color: var(--cs-brand-black);

    font-size: 13px;
    font-weight: 600;

    text-overflow: ellipsis;
}


/* ==========================================================================
   PANELS / FORM
   ========================================================================== */

.cs-account-form {
    display: grid;
    gap: 22px;
}

.cs-account-panel {
    padding: clamp(22px, 3vw, 34px);

    background: #FFFFFF;

    border: 1px solid var(--cs-border);
    border-radius: 5px;
}

.cs-account-panel__head {
    display: flex;

    align-items: flex-end;
    justify-content: space-between;

    gap: 28px;

    margin-bottom: 24px;
    padding-bottom: 18px;

    border-bottom: 1px solid #EEEEEB;
}

.cs-account-panel__head p {
    max-width: 420px;

    margin: 0;

    color: var(--cs-muted);

    font-size: 11px;
    line-height: 1.55;
    text-align: right;
}

.cs-account-grid {
    display: grid;

    grid-template-columns: repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.cs-account-field {
    display: grid;

    min-width: 0;

    gap: 7px;
}

.cs-account-field--wide {
    grid-column: span 2;
}

.cs-account-field > span {
    color: var(--cs-text);

    font-size: 11px;
    font-weight: 600;
}

.cs-account-field input,
.cs-account-field select {
    width: 100%;
    min-width: 0;
    min-height: 44px;

    box-sizing: border-box;

    padding: 9px 12px;

    background: #FFFFFF;
    color: var(--cs-brand-black);

    border: 1px solid #C9C9C4;
    border-radius: 4px;

    font-family: var(--font);
    font-size: 14px;
    font-weight: 450;

    outline: 0;

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease;
}

.cs-account-field input:hover,
.cs-account-field select:hover {
    border-color: #A8A8A3;
}

.cs-account-field input:focus,
.cs-account-field select:focus {
    border-color: var(--cs-brand-black);

    box-shadow:
        0 0 0 2px rgba(23, 23, 23, 0.08);
}


/* ==========================================================================
   BUTTONS
   ========================================================================== */

.cs-account-button {
    display: inline-flex;

    min-height: 43px;

    align-items: center;
    justify-content: center;

    box-sizing: border-box;

    padding: 9px 18px;

    border-radius: 4px;

    font-family: var(--font);
    font-size: 12px;
    font-weight: 650;

    text-decoration: none;

    cursor: pointer;

    transition:
        background 0.15s ease,
        color 0.15s ease,
        border-color 0.15s ease,
        transform 0.15s ease;
}

.cs-account-button--primary {
    background: var(--cs-brand-black);
    color: #FFFFFF;

    border: 1px solid var(--cs-brand-black);
}

.cs-account-button--primary:hover {
    background: var(--cs-red);
    border-color: var(--cs-red);
    color: #FFFFFF;

    transform: translateY(-1px);
}

.cs-account-button--secondary {
    background: #FFFFFF;
    color: var(--cs-brand-black);

    border: 1px solid #BEBEB9;
}

.cs-account-button--secondary:hover {
    border-color: var(--cs-brand-black);
}

.cs-account-submit {
    display: flex;

    align-items: center;

    gap: 18px;

    padding-top: 2px;
}

.cs-account-submit > span {
    color: var(--cs-muted);

    font-size: 11px;
    line-height: 1.45;
}


/* ==========================================================================
   EMPTY ACCOUNT
   ========================================================================== */

.cs-account-empty {
    max-width: 680px;

    padding: 46px 0;
}

.cs-account-empty p {
    margin: 16px 0 24px;

    color: var(--cs-muted);

    font-size: 15px;
    line-height: 1.6;
}


/* ==========================================================================
   LOGIN
   ========================================================================== */

.cs-login-page {
    display: grid;

    min-height: 62vh;

    place-items: start center;
}

.cs-login-card {
    width: min(100%, 520px);

    margin-top: clamp(8px, 5vh, 60px);
    padding: clamp(28px, 4vw, 44px);

    background: #FFFFFF;

    border: 1px solid var(--cs-border);
    border-radius: 6px;
}

.cs-login-intro {
    margin: 12px 0 28px;

    color: var(--cs-muted);

    font-size: 14px;
    line-height: 1.55;
}

.cs-login-form {
    display: grid;

    gap: 18px;
}

.cs-login-submit {
    width: 100%;

    margin-top: 3px;
}

.cs-login-help {
    display: flex;

    align-items: center;
    justify-content: space-between;

    gap: 18px;

    margin-top: 26px;
    padding-top: 18px;

    border-top: 1px solid #EEEEEB;

    color: var(--cs-muted);

    font-size: 11px;
}

.cs-login-help a {
    color: var(--cs-brand-black);

    font-weight: 600;

    text-decoration: underline;
    text-underline-offset: 3px;
}


/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

@media (max-width: 900px) {

    .cs-account-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .cs-account-identity {
        grid-template-columns: 1fr 1fr;
    }

    .cs-account-identity .cs-account-button {
        grid-column: 1 / -1;
        justify-self: start;
    }

}


@media (max-width: 650px) {

    .cs-account-page,
    .cs-login-page {
        padding-top: 24px;
    }

    .cs-account-header,
    .cs-account-panel__head {
        display: block;
    }

    .cs-account-header__actions {
        justify-content: flex-start;

        margin-top: 18px;
    }

    .cs-account-panel__head p {
        max-width: none;

        margin-top: 10px;

        text-align: left;
    }

    .cs-account-grid,
    .cs-account-identity {
        grid-template-columns: 1fr;
    }

    .cs-account-field--wide,
    .cs-account-identity .cs-account-button {
        grid-column: auto;
    }

    .cs-account-submit {
        align-items: stretch;
        flex-direction: column;
    }

    .cs-account-submit .cs-account-button {
        width: 100%;
    }

    .cs-login-card {
        padding: 26px 20px;
    }

    .cs-login-help {
        align-items: flex-start;
        flex-direction: column;

        gap: 7px;
    }

}


/* ==========================================================================
   CENTRAL AUTH: PASSWORD / ONE-TIME CODE SWITCH
   ========================================================================== */

.cs-login-mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;

    gap: 4px;

    margin: 0 0 24px;
    padding: 4px;

    background: #F3F3F1;
    border-radius: 5px;
}

.cs-login-mode-btn {
    min-height: 39px;

    padding: 8px 12px;

    background: transparent;
    color: var(--cs-muted);

    border: 0;
    border-radius: 3px;

    font-family: var(--font);
    font-size: 11px;
    font-weight: 600;

    cursor: pointer;
}

.cs-login-mode-btn.is-active {
    background: #FFFFFF;
    color: var(--cs-brand-black);

    box-shadow: 0 1px 3px rgba(0,0,0,.07);
}

.cs-login-form[hidden] {
    display: none !important;
}

.cs-login-text-button {
    justify-self: center;

    padding: 5px 8px;

    background: transparent;
    color: var(--cs-muted);

    border: 0;

    font-family: var(--font);
    font-size: 11px;

    text-decoration: underline;
    text-underline-offset: 3px;

    cursor: pointer;
}

.cs-login-security-note {
    margin: 24px 0 0;
    padding-top: 18px;

    color: var(--cs-muted);

    border-top: 1px solid #EEEEEB;

    font-size: 10px;
    line-height: 1.55;
}
