/**
 * Horeka — My Account page styles
 * Desktop: branded two-column login/register layout
 * Mobile:  plain WC form (falls back to existing quick.css account styles)
 */

/* ═══════════════════════════════════════════════════════════════════════════
   HEADER PARITY — Make account page look identical to quick-home
   ─────────────────────────────────────────────────────────────────────────
   The Elementor Full Width template (header-footer.php) is forced at
   template_include priority 9999 in functions.php. This bypasses page.php
   and removes etheme_page_heading. The CSS below is a belt-and-suspenders
   backstop: if any stray code still outputs these elements, they stay hidden.
   ═══════════════════════════════════════════════════════════════════════════ */

/* xstore "page-heading" breadcrumb bar (rendered by templates/page-heading.php) */
.woocommerce-account .page-heading { display: none !important; }

/* WooCommerce native breadcrumb */
.woocommerce-account .woocommerce-breadcrumb,
.woocommerce-account nav.woocommerce-breadcrumb { display: none !important; }

/* xstore PHP header (in case etheme_header_template_basic=true somehow) */
.woocommerce-account .header-wrapper,
.woocommerce-account .header-main-wrapper,
.woocommerce-account .sticky-on,
.woocommerce-account #top-bar { display: none !important; }

/* Remove the padding-top reserved for the xstore sticky header
   so the Elementor header sits flush with the page just like quick-home */
.woocommerce-account .et-main-wrapper,
.woocommerce-account #page { padding-top: 0 !important; margin-top: 0 !important; }

/* ═══════════════════════════════════════════════════════════════════════════
   FIX #4 — Hide "MY ACCOUNT" page heading
   xstore/WooCommerce renders this via several selectors; kill them all.
   ═══════════════════════════════════════════════════════════════════════════ */
.woocommerce-account .entry-title,
.woocommerce-account h1.entry-title,
.woocommerce-account header.entry-header,
.woocommerce-account .page-title,
.woocommerce-account h1.page-title,
.woocommerce-account .woocommerce > h1,
.woocommerce-account .woocommerce > h2:first-child,
.woocommerce-account .entry-content > h1:first-child { display: none !important; }

/* Remove WC/xstore page content padding so cards bleed cleanly */
.woocommerce-account .content-page,
.woocommerce-account .page-content { padding: 0 !important; }

/* Page background */
.woocommerce-account #page { background-color: #eef2f9 !important; }

/* Hide empty notices wrapper */
.woocommerce-account .woocommerce-notices-wrapper:empty { display: none; }
.woocommerce-account:not(.logged-in) .woocommerce-notices-wrapper { display: none !important; }

/* FIX #5 — Ensure the WC wrapper doesn't constrain width (header stays untouched) */
.woocommerce-account:not(.logged-in) .woocommerce {
    padding: 0 !important;
    max-width: 100% !important;
    width: 100% !important;
}

/* ═══════════════════════════════════════════════════════════════════════════
   VISIBILITY GATES
   Desktop ≥1024px: .hq-acct-login-page visible; .hq-acct-mobile-form hidden
   Mobile  <1024px: .hq-acct-mobile-form visible; .hq-acct-login-page hidden
   ═══════════════════════════════════════════════════════════════════════════ */
.hq-acct-mobile-form { display: none; }
.hq-acct-mobile-auth { display: none; }

@media (max-width: 1023px) {
    .hq-acct-login-page   { display: none !important; }
    .hq-acct-mobile-auth  { display: block; }
    /* inner login form is now controlled by its panel — strip the standalone padding */
    .hq-acct-mobile-auth .hq-acct-mobile-form { display: block; padding: 0; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   MOBILE TABBED AUTH (Login / Sign Up)  —  shown only <1024px
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
    .hq-acct-mobile-auth { max-width: 480px; margin: 0 auto; padding: 14px 16px 44px; }

    .hq-acct-m-hero { text-align: center; padding: 6px 0 16px; }
    .hq-acct-m-hero-icon {
        width: 52px; height: 52px; border-radius: 50%;
        background: #eef1fb; color: #1a237e;
        display: inline-flex; align-items: center; justify-content: center;
        margin-bottom: 10px;
    }
    .hq-acct-m-hero-title { font-size: 22px; font-weight: 800; color: #0d1b40; margin: 0 0 4px; }
    .hq-acct-m-hero-sub   { font-size: 13px; color: #64748b; margin: 0 auto; max-width: 320px; line-height: 1.45; }

    /* Top toggle */
    .hq-acct-m-tabs {
        display: flex; gap: 6px;
        background: #f1f5f9; border-radius: 14px; padding: 5px;
        margin: 0 0 18px;
    }
    .hq-acct-m-tab {
        flex: 1; border: none; background: transparent; border-radius: 10px;
        padding: 9px 6px; cursor: pointer;
        display: flex; flex-direction: column; align-items: center; gap: 1px;
        transition: background .15s, box-shadow .15s;
        -webkit-tap-highlight-color: transparent;
    }
    .hq-acct-m-tab-t { font-size: 14.5px; font-weight: 700; color: #475569; line-height: 1.2; }
    .hq-acct-m-tab-s { font-size: 10.5px; font-weight: 500; color: #94a3b8; }
    .hq-acct-m-tab.is-active { background: #fff; box-shadow: 0 1px 5px rgba(15,23,42,.10); }
    .hq-acct-m-tab.is-active .hq-acct-m-tab-t,
    .hq-acct-m-tab.is-active .hq-acct-m-tab-s { color: #1a237e; }

    /* Panels */
    .hq-acct-m-panel { display: none; }
    .hq-acct-m-panel.is-active { display: block; animation: hqAcctFade .2s ease; }
    @keyframes hqAcctFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

    /* Login submit — full-width navy to match desktop */
    .hq-acct-mobile-auth .woocommerce-form-login__submit {
        width: 100% !important; background: #1a237e !important; color: #fff !important;
        border: none !important; border-radius: 12px !important;
        padding: 14px !important; font-size: 15px !important; font-weight: 700 !important;
    }
    .hq-acct-mobile-auth .woocommerce-form-login__submit:hover { background: #283593 !important; }

    /* Sign-up panel */
    .hq-acct-m-signup {
        background: #fff; border: 1px solid #eef0f5; border-radius: 16px;
        padding: 20px 18px; box-shadow: 0 2px 10px rgba(15,23,42,.04);
    }
    .hq-acct-m-signup-title { font-size: 18px; font-weight: 800; color: #0d1b40; margin: 0 0 4px; }
    .hq-acct-m-signup-sub   { font-size: 13px; color: #64748b; margin: 0 0 16px; }
    .hq-acct-m-benefits { list-style: none; margin: 0 0 18px; padding: 0; display: flex; flex-direction: column; gap: 11px; }
    .hq-acct-m-benefits li { display: flex; align-items: flex-start; gap: 10px; font-size: 13.5px; color: #334155; line-height: 1.4; }
    .hq-acct-m-benefits li svg { flex: 0 0 18px; width: 18px; height: 18px; color: #16a34a; margin-top: 1px; }

    .hq-acct-m-create {
        width: 100%; background: #16a34a; color: #fff; border: none;
        border-radius: 12px; padding: 14px; font-size: 15px; font-weight: 700;
        cursor: pointer; transition: background .15s;
    }
    .hq-acct-m-create:hover { background: #15803d; }

    .hq-acct-m-or {
        text-align: center; position: relative; margin: 16px 0;
        color: #94a3b8; font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
    }
    .hq-acct-m-or span { background: #fff; padding: 0 10px; position: relative; z-index: 1; }
    .hq-acct-m-or::before { content: ""; position: absolute; top: 50%; left: 0; width: 100%; height: 1px; background: #e5e7eb; }

    .hq-acct-m-google {
        display: flex; align-items: center; justify-content: center; gap: 10px;
        width: 100%; border: 1.5px solid #e2e8f0; border-radius: 12px;
        padding: 12px; background: #fff; color: #1e293b; font-weight: 600;
        font-size: 14px; text-decoration: none;
    }
    .hq-acct-m-google:hover { background: #f8fafc; border-color: #cbd5e1; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */
.hq-acct-login-page {
    max-width: 1100px;
    margin: 0 auto;
    padding: 48px 24px 64px;
    font-family: inherit;
}

/* ── Page header (icon + "My Account" + subtitle) ─────────────────────── */
.hq-acct-page-hdr { text-align: center; margin-bottom: 36px; }

.hq-acct-page-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #dce8ff;
    color: #1a237e;
    margin-bottom: 14px;
}
.hq-acct-page-icon svg { display: block; }

.hq-acct-page-title {
    font-size: 30px !important;
    font-weight: 800 !important;
    color: #0d1b4b !important;
    margin: 0 0 8px !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: -0.3px;
}
.hq-acct-page-sub { font-size: 16px; color: #666; margin: 0; }

/* ═══════════════════════════════════════════════════════════════════════════
   FIX #1 — Equal card heights
   align-items: stretch makes both grid cells the same height;
   flex-direction: column on each card lets the "Create Account" button push
   to the card's bottom via margin-top: auto.
   ═══════════════════════════════════════════════════════════════════════════ */
.hq-acct-login-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    align-items: stretch;   /* ← fixed: was "start" */
    margin-bottom: 28px;
}

.hq-acct-card {
    background: #fff;
    border-radius: 16px;
    padding: 36px 32px;
    box-shadow: 0 2px 20px rgba(13, 27, 75, 0.07);
    display: flex;
    flex-direction: column;
}

/* ── Card header (icon circle + title) ───────────────────────────────── */
.hq-acct-card-hdr { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }

.hq-acct-card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px; height: 40px;
    border-radius: 10px;
    background: #e8eeff; color: #1a237e;
    flex-shrink: 0;
}
.hq-acct-card-icon--register { background: #e6f4ea; color: #2e7d32; }

.hq-acct-card-title {
    font-size: 22px !important; font-weight: 700 !important;
    color: #0d1b4b !important; margin: 0 !important; line-height: 1.2 !important;
}
.hq-acct-card-sub { font-size: 14px; color: #888; margin: 0 0 22px; line-height: 1.5; }

/* ── Input fields ─────────────────────────────────────────────────────── */
.hq-acct-field {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    border: 1.5px solid #dde1ea;
    border-radius: 10px;
    background: #fafbff;
    transition: border-color 0.2s, box-shadow 0.2s;
    overflow: hidden;
}
.hq-acct-field:focus-within {
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26,35,126,0.08);
    background: #fff;
}
.hq-acct-field-icon {
    display: flex; align-items: center; justify-content: center;
    width: 44px; flex-shrink: 0; color: #aab;
}
.hq-acct-input {
    flex: 1;
    border: none !important; outline: none !important;
    background: transparent !important; box-shadow: none !important;
    padding: 14px 14px 14px 0 !important;
    font-size: 15px !important; color: #1d2327 !important;
    line-height: 1.4 !important; margin: 0 !important; min-height: 0 !important;
}
.hq-acct-input::placeholder { color: #bbc; }

/* ── Inline field error state ─────────────────────────────────────────────── */
.hq-acct-field--error {
    border-color: #e53e3e !important;
    background: #fff8f8 !important;
    box-shadow: 0 0 0 3px rgba(229, 62, 62, .08) !important;
    margin-bottom: 4px !important;
}
.hq-acct-field-error {
    display: flex; align-items: center; gap: 5px;
    font-size: 12px; color: #e53e3e; font-weight: 500;
    margin: 0 0 12px; line-height: 1.4;
}
.hq-acct-field-error svg { flex-shrink: 0; }

/* ── FIX #3 — Hard-hide all password-visibility eye toggles ──────────────
   WC's woocommerce.js wraps password inputs in <span class="password-input">
   and appends a <span class="show-password-input"> toggle.
   No eye icon buttons are shown — nuke WC's button with every selector
   possible and also strip its space from the layout. */
.woocommerce-account .show-password-input,
.hq-acct-login-page .show-password-input,
.hq-acct-login-page .password-input .show-password-input,
.hq-acct-field .show-password-input,
.hq-acct-field .password-input .show-password-input,
.woocommerce-account .hq-acct-field .show-password-input,
.woocommerce-account .hq-acct-login-page .show-password-input {
    display:         none !important;
    visibility:      hidden !important;
    opacity:         0 !important;
    width:           0 !important;
    height:          0 !important;
    padding:         0 !important;
    margin:          0 !important;
    border:          none !important;
    overflow:        hidden !important;
    pointer-events:  none !important;
    position:        absolute !important;
    clip:            rect(0,0,0,0) !important;
}
/* Also undo the flex-gap WC adds when it wraps our input in .password-input */
.hq-acct-field .password-input {
    display:  contents !important;  /* transparent wrapper — children layout as if it doesn't exist */
}

/* ── FIX #3b — Kill the BROWSER-NATIVE password reveal eye ────────────────
   Edge/IE render their own ::-ms-reveal eye inside password fields, which
   showed as a SECOND eye next to WC's (already-hidden) toggle. These pseudo-
   elements aren't DOM nodes, so only CSS can remove them. */
.woocommerce-account input[type="password"]::-ms-reveal,
.woocommerce-account input[type="password"]::-ms-clear,
.hq-acct-mobile-auth input[type="password"]::-ms-reveal,
.hq-acct-mobile-auth input[type="password"]::-ms-clear {
    display: none !important;
}
/* Belt-and-suspenders: also hide WC's injected eye inside the mobile auth form */
.hq-acct-mobile-auth .show-password-input,
.hq-acct-mobile-form .show-password-input,
.hq-acct-mobile-auth .password-input .show-password-input {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    pointer-events: none !important;
}
.hq-acct-mobile-auth .password-input { display: contents !important; }

/* ── Remember me + Forgot password ───────────────────────────────────── */
/* Forgot link — own row, right-aligned, tight under the password field */
.hq-acct-forgot-row {
    display: flex; justify-content: flex-end;
    margin-top: -8px; margin-bottom: 14px;
}
.hq-acct-forgot {
    font-size: 12px; color: #1565c0; text-decoration: none; font-weight: 400;
}
.hq-acct-forgot:hover { text-decoration: underline; color: #0d47a1; }

/* Remember me row */
.hq-acct-form-extras {
    display: flex; align-items: center; margin-bottom: 22px;
}
.hq-acct-remember {
    display: flex; align-items: center; gap: 8px;
    font-size: 14px; color: #555; cursor: pointer; user-select: none;
}
.hq-acct-remember input[type="checkbox"] {
    width: 16px; height: 16px; border-radius: 4px;
    cursor: pointer; accent-color: #1a237e; flex-shrink: 0;
}

/* ── Buttons ──────────────────────────────────────────────────────────── */
.hq-acct-btn {
    display: block; width: 100%; padding: 15px 24px; border-radius: 10px;
    font-size: 16px; font-weight: 700; letter-spacing: 0.2px;
    text-align: center; cursor: pointer; border: none;
    transition: opacity 0.18s, transform 0.12s;
    text-decoration: none; line-height: 1.3;
}
.hq-acct-btn:hover  { opacity: 0.92; transform: translateY(-1px); }
.hq-acct-btn:active { transform: translateY(0); }

.hq-acct-btn--login    { background: #0d1b4b; color: #fff !important; margin-top: 4px; }
.hq-acct-btn--login:hover { color: #fff !important; }

.hq-acct-btn--register { background: #2e7d32; color: #fff !important; margin-top: auto; }
.hq-acct-btn--register:hover { color: #fff !important; background: #256427; }

/* ═══════════════════════════════════════════════════════════════════════════
   FIX #2 — xstore social login: hide their divider text, restyle their button
   ─────────────────────────────────────────────────────────────────────────
   xstore outputs inside the <form> via woocommerce_login_form_end:
     <div class="et-or-wrapper">  ← "or sign in with a social network"
     <div class="et-google-login-wrapper">
       <a class="et-google-login-button ..."><i>SVG</i> Google</a>
   We hide the text div, inject a clean divider via ::before on the wrapper,
   and completely restyle the <a> to look like "Continue with Google".
   ═══════════════════════════════════════════════════════════════════════════ */

/* 1. Kill xstore's "or sign in with a social network" text row */
.hq-acct-login-card .et-or-wrapper { display: none !important; }

/* 2. Clean divider above the restyled Google button */
.hq-acct-login-card .et-google-login-wrapper {
    margin-top: 20px;
}
.hq-acct-login-card .et-google-login-wrapper::before {
    content: 'OR SIGN IN WITH';
    display: block;
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    letter-spacing: 0.9px;
    padding: 0;
    margin-bottom: 14px;
    position: relative;
}

/* 3. Restyle the blue xstore Google button → white "Continue with Google" */
.hq-acct-login-card .et-google-login-button.et-google-login-button {
    /* layout */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 12px !important;
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 13px 20px !important;
    /* appearance */
    background: #fff !important;
    background-color: #fff !important;
    border: 1.5px solid #dde1ea !important;
    border-radius: 10px !important;
    box-shadow: none !important;
    /* typography — hide original "Google" text */
    font-size: 0 !important;        /* makes the raw "Google" text node invisible */
    color: transparent !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    text-decoration: none !important;
    transition: border-color 0.18s, box-shadow 0.18s !important;
    line-height: 1 !important;
}
.hq-acct-login-card .et-google-login-button.et-google-login-button:hover {
    border-color: #1a237e !important;
    box-shadow: 0 2px 10px rgba(26,35,126,0.08) !important;
    color: transparent !important;
}

/* Keep xstore's Google SVG icon visible (font-size:0 doesn't affect SVG dims) */
.hq-acct-login-card .et-google-login-button .et-icon {
    display: inline-flex !important;
    align-items: center !important;
    flex-shrink: 0 !important;
    font-size: 0 !important;
    line-height: 0 !important;
}
.hq-acct-login-card .et-google-login-button .et-icon svg {
    width: 20px !important;
    height: 20px !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* Inject "Continue with Google" label as pseudo-element */
.hq-acct-login-card .et-google-login-button::after {
    content: 'Continue with Google';
    font-size: 15px !important;
    font-weight: 600 !important;
    color: #333 !important;
    letter-spacing: 0 !important;
    line-height: 1.3 !important;
}

/* 4. Hide Google Site Kit's duplicate button (fires at woocommerce_login_form_start) */
.hq-acct-login-page .googlesitekit-sign-in-with-google__frontend-output-button,
.hq-acct-login-page .googlesitekit-sign-in-with-google__frontend-output { display: none !important; }

/* ── "Don't have an account?" link ───────────────────────────────────── */
.hq-acct-switch-link {
    font-size: 14px; color: #666; text-align: center; margin: 20px 0 0;
}
.hq-acct-switch-link a { color: #1565c0; font-weight: 600; text-decoration: none; }
.hq-acct-switch-link a:hover { text-decoration: underline; }

/* ── Benefits list (right card) ───────────────────────────────────────── */
.hq-acct-benefits {
    list-style: none; margin: 0 0 28px; padding: 0;
    display: flex; flex-direction: column; gap: 18px;
    flex: 1;  /* grows to fill card height, pushes Create Account to bottom */
}
.hq-acct-benefit { display: flex; align-items: flex-start; gap: 14px; }

.hq-acct-benefit-icon {
    width: 40px; height: 40px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0; margin-top: 1px;
}
.hq-acct-benefit-icon--orders      { background: #e3f2fd; color: #1565c0; }
.hq-acct-benefit-icon--time        { background: #fce4ec; color: #c62828; }
.hq-acct-benefit-icon--personalised{ background: #fff8e1; color: #e65100; }
.hq-acct-benefit-icon--secure      { background: #e8f5e9; color: #2e7d32; }

.hq-acct-benefit div    { display: flex; flex-direction: column; gap: 3px; }
.hq-acct-benefit strong { font-size: 15px; font-weight: 700; color: #1d2327; line-height: 1.3; }
.hq-acct-benefit span   { font-size: 13px; color: #888; line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════════════════════
   TRUST BAR
   ═══════════════════════════════════════════════════════════════════════════ */
.hq-acct-trust-bar {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #dde1ea;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 1px 8px rgba(13,27,75,0.06);
    margin-top: 4px;
}
.hq-acct-trust-item {
    background: #fff;
    display: flex; align-items: center;
    gap: 14px; padding: 20px 22px;
}
.hq-acct-trust-icon { color: #1a237e; flex-shrink: 0; display: flex; align-items: center; }
.hq-acct-trust-item div    { display: flex; flex-direction: column; gap: 2px; }
.hq-acct-trust-item strong { font-size: 13px; font-weight: 700; color: #1d2327; line-height: 1.3; }
.hq-acct-trust-item span   { font-size: 12px; color: #999; line-height: 1.4; }

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE — compact at 1024–1200px
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 1200px) and (min-width: 1024px) {
    .hq-acct-trust-bar  { grid-template-columns: repeat(2, 1fr); }
    .hq-acct-login-page { padding: 40px 20px 56px; }
    .hq-acct-card       { padding: 28px 24px; }
}

/* ── Link-style button (used as "Register" inline trigger) ───────── */
.hq-link-btn {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
    color: #1565c0;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    font-family: inherit;
    line-height: inherit;
    vertical-align: baseline;
    transition: color 0.15s;
}
.hq-link-btn:hover { color: #0d47a1; text-decoration: underline; }

/* ═══════════════════════════════════════════════════════════════════════════
   REGISTRATION MODAL
   ═══════════════════════════════════════════════════════════════════════════ */

/* Overlay — full-screen dark backdrop */
.hq-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 999999;
    background: rgba(10, 18, 50, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    animation: hq-fadeIn 0.18s ease;
}
.hq-modal-overlay[hidden] { display: none !important; }

@keyframes hq-fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* Modal box */
.hq-modal-box {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 560px;
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    padding: 32px 32px 28px;
    box-shadow: 0 20px 60px rgba(10, 18, 50, 0.22);
    position: relative;
    animation: hq-slideUp 0.22s ease;
}

@keyframes hq-slideUp {
    from { transform: translateY(24px); opacity: 0; }
    to   { transform: translateY(0);    opacity: 1; }
}

/* ── Modal header ────────────────────────────────────────────────── */
.hq-modal-hdr {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 24px;
}

.hq-modal-hdr-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #e6f4ea;
    color: #2e7d32;
    flex-shrink: 0;
}

.hq-modal-title {
    flex: 1;
    font-size: 20px !important;
    font-weight: 800 !important;
    color: #0d1b4b !important;
    margin: 0 !important;
    line-height: 1.2 !important;
    text-transform: none !important;
    letter-spacing: -0.2px;
}

.hq-modal-close {
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: #aab;
    border-radius: 8px;
    display: flex;
    align-items: center;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
}
.hq-modal-close:hover { background: #f0f0f5; color: #333; }

/* ── Step indicator ──────────────────────────────────────────────── */
.hq-reg-steps {
    display: flex;
    align-items: center;
    margin-bottom: 24px;
}

.hq-reg-step {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

.hq-reg-step-dot {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    border: 2px solid #dde1ea;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: #bbc;
    background: #f7f8fc;
    transition: all 0.2s;
}

.hq-reg-step-lbl {
    font-size: 13px;
    font-weight: 600;
    color: #aab;
    transition: color 0.2s;
}

/* Active step */
.hq-reg-step.is-active .hq-reg-step-dot {
    background: #0d1b4b;
    border-color: #0d1b4b;
    color: #fff;
}
.hq-reg-step.is-active .hq-reg-step-lbl { color: #0d1b4b; }

/* Completed step */
.hq-reg-step.is-done .hq-reg-step-dot {
    background: #2e7d32;
    border-color: #2e7d32;
    color: #fff;
}
.hq-reg-step.is-done .hq-reg-step-lbl { color: #2e7d32; }

/* Connector line between steps */
.hq-reg-step-line {
    flex: 1;
    height: 2px;
    background: #dde1ea;
    margin: 0 10px;
    border-radius: 2px;
}

/* ── Error banner ────────────────────────────────────────────────── */
.hq-reg-error {
    background: #fff4f4;
    border: 1.5px solid #f5c6cb;
    border-radius: 10px;
    color: #c0392b;
    font-size: 14px;
    font-weight: 500;
    padding: 12px 16px;
    margin-bottom: 18px;
    line-height: 1.5;
}
.hq-reg-error[hidden] { display: none !important; }

/* ── Form panels (steps) ─────────────────────────────────────────── */
.hq-reg-panel[hidden] { display: none !important; }

/* ── Form fields ─────────────────────────────────────────────────── */
.hq-reg-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 16px;
}

.hq-reg-field label {
    font-size: 13px;
    font-weight: 600;
    color: #444;
    line-height: 1.3;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Two-column row */
.hq-reg-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

/* Input */
.hq-reg-input {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #dde1ea;
    border-radius: 10px;
    background: #fafbff;
    font-size: 15px;
    color: #1d2327;
    font-family: inherit;
    line-height: 1.4;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    outline: none;
    margin: 0;
}
.hq-reg-input:focus {
    border-color: #1a237e;
    box-shadow: 0 0 0 3px rgba(26, 35, 126, 0.08);
    background: #fff;
}
.hq-reg-input::placeholder { color: #bbc; }
.hq-reg-input.hq-reg-invalid {
    border-color: #e53935;
    box-shadow: 0 0 0 3px rgba(229, 57, 53, 0.08);
}

/* ── Password wrapper (input + eye toggle) ───────────────────────── */
.hq-reg-pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}
.hq-reg-pw-wrap .hq-reg-input {
    padding-right: 46px;
}
.hq-reg-pw-toggle {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    color: #aab;
    display: flex;
    align-items: center;
    transition: color 0.15s;
}
.hq-reg-pw-toggle:hover { color: #1a237e; }

/* ── Text helpers ────────────────────────────────────────────────── */
.hq-required  { color: #e53935; font-size: 12px; }
.hq-reg-optional {
    font-size: 11px;
    font-weight: 400;
    color: #aab;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}
.hq-reg-note {
    font-size: 13px;
    color: #888;
    background: #f7f8fc;
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 16px;
    line-height: 1.5;
}
.hq-reg-step2-sub {
    font-size: 14px;
    color: #777;
    margin: 0 0 18px;
    line-height: 1.5;
}

/* ── Social / Google section (step 1) ───────────────────────────── */
.hq-reg-social {
    margin: 8px 0 18px;
}

.hq-reg-social-divider {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 14px;
    font-size: 11px;
    font-weight: 600;
    color: #aaa;
    letter-spacing: 0.8px;
    text-transform: uppercase;
}
.hq-reg-social-divider::before,
.hq-reg-social-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e5e7ef;
}

.hq-reg-google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 13px 20px;
    background: #fff;
    border: 1.5px solid #dde1ea;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #333;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 0.18s, box-shadow 0.18s;
    box-sizing: border-box;
    font-family: inherit;
}
.hq-reg-google-btn:hover {
    border-color: #1a237e;
    box-shadow: 0 2px 10px rgba(26, 35, 126, 0.08);
    color: #333;
    text-decoration: none;
}

/* ── Action buttons ──────────────────────────────────────────────── */
.hq-reg-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    border: none;
    font-family: inherit;
    transition: opacity 0.18s, transform 0.12s;
    line-height: 1.3;
    text-decoration: none;
}
.hq-reg-btn:hover  { opacity: 0.9; transform: translateY(-1px); }
.hq-reg-btn:active { transform: translateY(0); }
.hq-reg-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Continue button */
.hq-reg-btn--next {
    background: #0d1b4b;
    color: #fff;
    width: 100%;
    margin-top: 6px;
}
.hq-reg-btn--next:hover { color: #fff; }

/* Step 2 action row */
.hq-reg-actions {
    display: flex;
    gap: 12px;
    margin-top: 8px;
}

/* Back button */
.hq-reg-btn--back {
    background: #f0f2f8;
    color: #555;
    flex-shrink: 0;
    padding: 14px 18px;
}
.hq-reg-btn--back:hover { background: #e4e7f2; color: #333; }

/* Submit / Create Account button */
.hq-reg-btn--submit {
    background: #2e7d32;
    color: #fff;
    flex: 1;
}
.hq-reg-btn--submit:hover { background: #256427; color: #fff; }

/* ── Responsive: tighter on small screens ───────────────────────── */
@media (max-width: 600px) {
    .hq-modal-box {
        padding: 24px 18px 20px;
        border-radius: 16px;
    }
    .hq-reg-row-2 { grid-template-columns: 1fr; gap: 0; }
    .hq-reg-actions { flex-direction: column-reverse; }
    .hq-reg-btn--back { width: 100%; padding: 12px 18px; }
}
