/**
 * AFitt account page — branded Hungarian auth surface (PRO-01).
 * Presentation only; auth logic lives in afitt-bistro-core src/Account/AccountAuth.php.
 */

.account-shell {
    max-width: 480px;
    margin: 0 auto;
    padding: var(--space-2xl) 0 var(--space-3xl);
}

.account-card {
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-card);
    padding: var(--space-xl);
    margin-top: var(--space-lg);
}

.account-card__title {
    margin: 0 0 var(--space-xs);
    font-family: var(--font-display, inherit);
    font-size: 1.35rem;
    color: var(--color-text-primary);
}

.account-card__lead {
    margin: 0 0 var(--space-lg);
    color: var(--color-text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
}

.account-notice {
    background: var(--color-bg-cream);
    border: 1px solid var(--color-border-medium);
    border-left: 4px solid var(--color-brand-red-bright);
    border-radius: var(--radius-sm);
    padding: var(--space-sm) var(--space-md);
    margin: var(--space-md) 0;
    color: var(--color-text-primary);
}

.account-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
}

.account-field {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
}

.account-field__label {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.account-field input[type="text"],
.account-field input[type="email"],
.account-field input[type="password"] {
    width: 100%;
    min-height: 44px;
    padding: 0 var(--space-sm);
    border: 1px solid var(--color-border-medium);
    border-radius: var(--radius-sm);
    font-size: 1rem;
    color: var(--color-text-primary);
    background: var(--color-bg-white);
}

.account-field input:focus-visible {
    outline: 2px solid var(--color-brand-red-bright);
    outline-offset: 1px;
    border-color: var(--color-brand-red-bright);
}

.account-remember {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    min-height: 44px;
}

/* Primary action: Afitt Display HU on brand red, white label. */
.account-form .account-submit {
    width: 100%;
    min-height: 52px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.0625rem;
    line-height: 1.2;
    letter-spacing: 0.01em;
    text-transform: none;
    background: var(--color-brand-red-bright);
    color: var(--color-text-inverse);
    border: 0;
    border-radius: var(--radius-full);
    padding: 14px var(--space-lg);
    cursor: pointer;
    box-shadow: var(--shadow-button, 0 2px 8px rgba(33, 26, 22, 0.12));
    transition: background var(--transition-fast), transform var(--transition-fast);
}

.account-form .account-submit:hover {
    background: var(--color-brand-red-bright-hover);
}

.account-form .account-submit:focus-visible {
    outline: var(--focus-ring-width) solid var(--color-brand-red-bright);
    outline-offset: var(--focus-ring-offset);
}

.account-form .account-submit:active {
    transform: scale(var(--scale-active));
}

.account-form .account-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.account-alt {
    margin: var(--space-lg) 0 0;
    font-size: 0.9rem;
}

.account-alt a,
.account-foot a {
    color: var(--color-brand-red-bright-hover);
}

.account-hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}

.account-foot {
    margin-top: var(--space-xl);
    font-size: 0.85rem;
    color: var(--color-text-muted);
    line-height: 1.5;
    text-align: center;
}

/* Logged-in portal wrapper */
.account-portal {
    margin-top: var(--space-lg);
}

/* Logged-in: the portal spans the content width (only the login card is narrow). */
.account-portal-full {
    width: 100%;
    padding: var(--space-2xl) 0 var(--space-3xl);
}
.afitt-account-page .fct_customer_profile_wrap {
    max-width: 100% !important;
}

/* Centered page title (both logged-in and guest). */
.account-title {
    text-align: center;
    margin-bottom: var(--space-lg);
}

/* ---- Brand theming of the FluentCart customer portal ------------------- */
/* FluentCart exposes --fct-customer-dashboard-* vars (:root mappings). We set
   the final values on the account page so the portal matches the AFitt brand:
   white surfaces, black text/icons, brand-red active + buttons. Element Plus
   is recoloured via --el-color-primary* for its own widgets.
   `html body.afitt-account-page` outranks the vendor's
   `body:not(.fluent-cart-no-colors)` block (which loads later) by specificity. */
html body.afitt-account-page {
    /* text */
    --fct-customer-dashboard-primary-text-color: #211A16;
    --fct-customer-dashboard-title-color: #211A16;
    --fct-customer-dashboard-secondary-text-color: #5C4F47;
    --fct-customer-dashboard-sub-title-color: #5C4F47;
    --fct-customer-dashboard-text-color: #5C4F47;
    --fct-customer-dashboard-meta-text-color: #76685F;
    --fct-customer-dashboard-faint-text-color: #76685F;
    --fct-customer-dashboard-label-text-color: #5C4F47;
    --fct-customer-dashboard-caption-text-color: #76685F;
    --fct-customer-dashboard-hint-text-color: #76685F;
    --fct-customer-dashboard-note-text-color: #76685F;

    /* links */
    --fct-customer-dashboard-link-color: #C41718;
    --fct-customer-dashboard-link-hover-color: #E11B1C;
    --fct-customer-dashboard-info-link-color: #C41718;
    --fct-customer-dashboard-blue-link-color: #C41718;

    /* navigation */
    --fct-customer-dashboard-nav-text-color: #211A16;
    --fct-customer-dashboard-nav-active-text-color: #E11B1C;
    --fct-customer-dashboard-nav-active-bg-color: #FDECEA;
    --fct-customer-dashboard-nav-active-bar-color: #E11B1C;

    /* surfaces (white card, cream hover) */
    --fct-customer-dashboard-card-bg: #FFFFFF;
    --fct-customer-dashboard-surface-alt: #FFF7E8;
    --fct-customer-dashboard-surface-muted: #FBF3E6;
    --fct-customer-dashboard-surface-neutral: #FFF7E8;
    --fct-customer-dashboard-surface-light: #FFF7E8;
    --fct-customer-dashboard-code-bg: #FFF7E8;
    --fct-customer-dashboard-chip-bg: #FFF7E8;
    --fct-customer-dashboard-info-panel-bg: #FFF7E8;
    --fct-customer-dashboard-hover-bg: #FFF7E8;
    --fct-customer-dashboard-hover-strong-bg: #F7E9D2;
    --fct-customer-dashboard-soft-hover-bg: #FFF7E8;

    /* borders */
    --fct-customer-dashboard-border-color: #E8DED5;
    --fct-customer-dashboard-divider-color: #E8DED5;
    --fct-customer-dashboard-row-divider-color: #E8DED5;
    --fct-customer-dashboard-rule-color: #E8DED5;
    --fct-customer-dashboard-scrollbar-thumb: #E8DED5;

    /* primary buttons = brand red */
    --fct-customer-dashboard-btn-bg-color: #E11B1C;
    --fct-customer-dashboard-btn-border-color: #E11B1C;
    --fct-customer-dashboard-btn-text-color: #FFFFFF;
    --fct-customer-dashboard-btn-hover-bg-color: #C41718;
    --fct-customer-dashboard-btn-hover-text-color: #FFFFFF;
    --fct-customer-dashboard-check-bg: #E11B1C;
    --fct-customer-dashboard-check-icon: #FFFFFF;

    /* inputs */
    --fct-customer-dashboard-input-bg: #FFFFFF;
    --fct-customer-dashboard-input-text: #211A16;
    --fct-customer-dashboard-input-border: #E8DED5;
    --fct-customer-dashboard-input-placeholder: #76685F;
    --fct-customer-dashboard-el-input-text: #211A16;

    /* pagination */
    --fct-customer-dashboard-paginator-text-color: #5C4F47;
    --fct-customer-dashboard-paginator-items-active-color: #FFFFFF;
    --fct-customer-dashboard-paginator-items-active-bg: #E11B1C;
    --fct-customer-dashboard-paginator-items-active-border: #E11B1C;

    /* logout */
    --fct-customer-dashboard-logout-btn-bg-color: #FDECEA;
    --fct-customer-dashboard-logout-btn-text-color: #C41718;
    --fct-customer-dashboard-logout-btn-hover-bg-color: #F8D7D6;

    /* Element Plus widgets (buttons, tabs, pagination, switches…) */
    --el-color-primary: #E11B1C;
    --el-color-primary-dark-2: #C41718;
    --el-color-primary-light-3: #E85B5C;
    --el-color-primary-light-5: #EE8A8A;
    --el-color-primary-light-7: #F4B9B9;
    --el-color-primary-light-8: #F7D0D0;
    --el-color-primary-light-9: #FDECEA;
    --el-border-radius-base: 10px;
}

/* The portal card itself: white, brand border + soft shadow. */
.afitt-account-page .fct_customer_profile_wrap,
.afitt-account-page .fct-customer-dashboard {
    background: var(--color-bg-white, #fff);
}
.afitt-account-page .fct_customer_profile_wrap {
    border: 1px solid var(--color-border-light, #E8DED5);
    border-radius: var(--radius-lg, 1rem);
    box-shadow: var(--shadow-card, 0 2px 8px rgba(33,26,22,.08));
    overflow: hidden;
}

/* AFitt portal sections (Kedvencek / Heti rendelések custom endpoints) */
.afitt-account-section {
    padding: var(--space-md) 0;
}

.afitt-account-section__title {
    margin: 0 0 var(--space-md);
    font-family: var(--font-display, inherit);
    font-size: 1.2rem;
    color: var(--color-text-primary);
}

.afitt-account-empty {
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.afitt-account-list {
    list-style: none;
    margin: 0 0 var(--space-md);
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.afitt-account-list__item {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm);
    background: var(--color-bg-white);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
}

.afitt-account-list__thumb {
    width: 56px;
    height: 56px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    flex: 0 0 auto;
}

.afitt-account-list__link {
    color: var(--color-text-primary);
    font-weight: 600;
    text-decoration: none;
}

.afitt-account-list__item--order {
    justify-content: space-between;
    gap: var(--space-md);
    flex-wrap: wrap;
}

.afitt-account-order__date {
    color: var(--color-text-secondary);
}

.afitt-account-order__status {
    font-weight: 600;
    color: var(--color-text-primary);
}

.afitt-account-order__total {
    font-variant-numeric: tabular-nums;
    color: var(--color-brand-red-bright-hover);
    font-weight: 700;
}

.afitt-account-cta {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    padding: 0 var(--space-lg);
    background: var(--color-brand-red-bright);
    color: var(--color-text-inverse);
    border-radius: var(--radius-full);
    text-decoration: none;
    font-weight: 700;
}

.afitt-account-cta:hover,
.afitt-account-cta:focus-visible {
    background: var(--color-brand-red-bright-hover);
}

@media (max-width: 560px) {
    .account-card {
        padding: var(--space-lg);
    }
}

/* Passwordless (magic-link) request — secondary action beside the login form. */
.account-magic {
    margin: var(--space-lg) 0 0;
    padding-top: var(--space-lg);
    border-top: 1px solid var(--color-border-light, #E9DFD4);
}

.account-magic__title {
    margin: 0 0 var(--space-xs);
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1.25rem;
    color: var(--color-text-primary);
}

.account-magic__lead {
    margin: 0 0 var(--space-sm);
    font-size: 0.9rem;
    line-height: 1.5;
    color: var(--color-text-secondary);
}

.account-magic__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: var(--space-sm);
    min-height: 48px;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: 1rem;
    background: transparent;
    color: var(--color-brand-red-bright);
    border: 2px solid var(--color-brand-red-bright);
    border-radius: var(--radius-full);
    padding: 12px var(--space-lg);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.account-magic__btn:hover {
    background: var(--color-brand-red-bright);
    color: var(--color-text-inverse);
}

.account-magic__msg {
    margin: var(--space-sm) 0 0;
    font-size: 0.9rem;
    min-height: 1.2em;
}

.account-magic__msg.is-ok {
    color: #166534;
}

.account-magic__msg.is-err {
    color: var(--color-brand-red-bright-hover);
}
