/* ── HousifyHub – Visitor Pages (register, login, my-account)
   Scoped under .hk-visitor-page. Mobile-first.
   ─────────────────────────────────────────────────────────────────────────── */

/* ── Page wrapper ─────────────────────────────────────────────────────────── */
.hk-visitor-page {
    font-family: var(--hk-font, 'Plus Jakarta Sans', system-ui, sans-serif);
    background: #f8faf8;
    min-height: 100vh;
    padding: 24px 16px 48px;
    box-sizing: border-box;
}
.hk-visitor-page * { box-sizing: border-box; }

/* ── Auth card (register / login / not-logged-in message) ────────────────── */
.hk-visitor-auth {
    max-width: 480px;
    margin: 0 auto;
    background: #fff;
    border-radius: 14px;
    padding: 36px 28px;
    box-shadow: 0 4px 24px rgba(0,0,0,.09);
    border: 1px solid #e5e7eb;
}

.hk-auth-logo {
    display: block;
    font-size: 17px;
    font-weight: 800;
    color: #1e7a34;
    text-decoration: none;
    margin-bottom: 20px;
    letter-spacing: -.2px;
}
.hk-auth-logo:hover { color: #155c27; }

.hk-visitor-auth h2 {
    margin: 0 0 6px;
    font-size: 22px;
    font-weight: 700;
    color: #111827;
}
.hk-visitor-auth > p {
    margin: 0 0 24px;
    color: #6b7280;
    font-size: 14px;
}

/* ── Form fields ─────────────────────────────────────────────────────────── */
.hk-form .hk-field {
    display: flex;
    flex-direction: column;
    gap: 4px;
    margin-bottom: 16px;
}
.hk-form .hk-field label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.hk-form .hk-field input {
    padding: 12px 14px;
    border: 1.5px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    font-family: inherit;
    color: #111827;
    background: #fff;
    width: 100%;
    transition: border-color .15s, box-shadow .15s;
}
.hk-form .hk-field input:focus {
    outline: none;
    border-color: #1e7a34;
    box-shadow: 0 0 0 3px rgba(30,122,52,.10);
}
.hk-form .hk-field .req { color: #ef4444; }

/* Inline field error (below each input) */
.hk-field-error {
    font-size: 12px;
    color: #dc2626;
    min-height: 16px;
}

/* Forgot-password right-aligned link */
.hk-field-forgot {
    text-align: right;
    margin-top: 4px;
}
.hk-field-forgot a {
    font-size: 13px;
    color: #1e7a34;
    text-decoration: none;
}
.hk-field-forgot a:hover { text-decoration: underline; }

/* ── Submit button (inherits .hk-btn-submit-big from style.css) ──────────── */
.hk-visitor-page .hk-btn-submit-big {
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
}

/* ── Auth switch line ("Already have an account?") ───────────────────────── */
.hk-auth-switch {
    margin-top: 18px;
    text-align: center;
    font-size: 14px;
    color: #6b7280;
}
.hk-auth-switch a {
    color: #1e7a34;
    font-weight: 600;
    text-decoration: none;
}
.hk-auth-switch a:hover { text-decoration: underline; }

/* ── Account-type selector (below sign-in form) ──────────────────────────── */
.hk-auth-type {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}
.hk-auth-type-label {
    font-size: 13px;
    color: #6b7280;
    text-align: center;
    margin: 0 0 12px;
}
/* Mobile: stacked; 480px+: side by side */
.hk-auth-type-cards {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
@media (min-width: 480px) {
    .hk-auth-type-cards { flex-direction: row; }
}
/* !important overrides Astra's aggressive <a> resets */
.hk-auth-type-card {
    flex: 1;
    display: flex !important;
    flex-direction: column !important;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 16px 12px;
    border: 1.5px solid #e5e7eb !important;
    border-radius: 10px;
    text-decoration: none !important;
    text-align: center;
    background: #f9fafb;
    color: #374151;
    box-sizing: border-box;
    transition: border-color .15s, background .15s, transform .12s;
}
.hk-auth-type-card:hover,
.hk-auth-type-card:focus {
    border-color: #1e7a34 !important;
    background: #f0fdf4;
    color: #111827;
    transform: translateY(-2px);
    text-decoration: none !important;
    outline: none;
}
/* display:block ensures each span occupies its own row inside the flex column */
.hk-auth-type-icon  { font-size: 24px; line-height: 1; display: block; }
.hk-auth-type-title { font-size: 13px; font-weight: 700; color: #111827; display: block; }
.hk-auth-type-sub   { font-size: 11px; color: #9ca3af; display: block; }

/* ═══════════════════════════════════════════════════════════════════════════
   MY ACCOUNT DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */

.hk-myaccount {
    max-width: 1000px;
    margin: 0 auto;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.hk-myaccount-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    flex-wrap: wrap;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: 0 1px 6px rgba(0,0,0,.05);
}
.hk-myaccount-title {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 3px;
}
.hk-myaccount-user {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
}
.hk-myaccount-user span {
    font-weight: 400;
    color: #9ca3af;
}
.hk-btn-signout {
    background: #f9fafb;
    color: #374151;
    border: 1.5px solid #e5e7eb;
    padding: 9px 18px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
    font-family: inherit;
    transition: background .15s, border-color .15s;
}
.hk-btn-signout:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #991b1b;
}

/* ── Tabs ────────────────────────────────────────────────────────────────── */
.hk-myaccount-tabs {
    display: flex;
    gap: 6px;
    margin-bottom: 20px;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 0;
}
.hk-myaccount-tab {
    -webkit-appearance: none;
    appearance: none;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    transition: color .15s, border-color .15s;
    display: flex;
    align-items: center;
    gap: 6px;
}
.hk-myaccount-tab:hover { color: #1e7a34; }
.hk-myaccount-tab.is-active {
    color: #1e7a34;
    border-bottom-color: #1e7a34;
}
.hk-tab-count {
    background: #dcfce7;
    color: #166534;
    font-size: 11px;
    font-weight: 700;
    padding: 1px 7px;
    border-radius: 20px;
    min-width: 20px;
    text-align: center;
}

/* ── Panel ───────────────────────────────────────────────────────────────── */
.hk-myaccount-panel { min-height: 200px; }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.hk-myaccount-empty {
    text-align: center;
    padding: 56px 20px;
    color: #6b7280;
}
.hk-myaccount-empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    line-height: 1;
    color: #d1d5db;
}
.hk-myaccount-empty p {
    margin: 0 0 20px;
    font-size: 15px;
}

/* ── Saved properties grid ───────────────────────────────────────────────── */
.hk-myaccount-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
}
@media (min-width: 480px) {
    .hk-myaccount-grid { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 768px) {
    .hk-myaccount-grid { grid-template-columns: repeat(3, 1fr); }
}

/* ── Saved property card ─────────────────────────────────────────────────── */
.hk-fav-card {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
    transition: box-shadow .15s, transform .15s;
}
.hk-fav-card:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,.10);
    transform: translateY(-2px);
}
.hk-fav-card-inner {
    display: flex;
    flex-direction: column;
    text-decoration: none;
    color: inherit;
}
.hk-fav-thumb {
    width: 100%;
    height: 150px;
    overflow: hidden;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.hk-fav-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform .3s;
}
.hk-fav-card:hover .hk-fav-thumb img { transform: scale(1.03); }
.hk-fav-no-img {
    font-size: 36px;
    color: #9ca3af;
}
.hk-fav-body {
    padding: 12px 14px 14px;
}
.hk-fav-title {
    font-size: 14px;
    font-weight: 600;
    color: #111827;
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hk-fav-meta {
    font-size: 12px;
    color: #9ca3af;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.hk-fav-price {
    font-size: 15px;
    font-weight: 700;
    color: #1e7a34;
}

/* Remove (×) button */
.hk-fav-remove {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    border: none;
    background: rgba(0,0,0,.55);
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    opacity: 0;
    transition: opacity .15s, background .15s;
    z-index: 2;
}
.hk-fav-card:hover .hk-fav-remove { opacity: 1; }
.hk-fav-remove:hover { background: #ef4444; }

/* Always show remove button on touch devices */
@media (hover: none) {
    .hk-fav-remove { opacity: 1; }
}

/* ── Settings panel ──────────────────────────────────────────────────────── */
.hk-settings-wrap {
    max-width: 640px;
}
.hk-settings-wrap .hk-form .hk-field {
    margin-bottom: 18px;
}
.hk-settings-wrap .hk-btn-submit-big {
    max-width: 200px;
    width: 100%;
    margin-top: 8px;
}

/* ── Settings section cards ──────────────────────────────────────────────── */
.hk-settings-section {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 20px;
}
.hk-settings-section-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
    margin: 0 0 16px;
}
.hk-settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
@media (max-width: 480px) {
    .hk-settings-row { grid-template-columns: 1fr; }
}

/* ── Danger zone ─────────────────────────────────────────────────────────── */
.hk-settings-danger-zone {
    border-color: #fecaca;
    background: #fff8f8;
}
.hk-settings-danger-title { color: #dc2626; }
.hk-settings-danger-desc {
    font-size: 14px;
    color: #6b7280;
    margin: 0 0 16px;
}
.hk-settings-danger-confirm-text {
    font-size: 14px;
    color: #dc2626;
    font-weight: 600;
    margin: 0 0 14px;
}
.hk-settings-danger-btns {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

/* ── Danger button ───────────────────────────────────────────────────────── */
.hk-btn-danger {
    -webkit-appearance: none;
    appearance: none;
    background: #dc2626;
    color: #fff;
    border: none;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.hk-btn-danger:hover { background: #b91c1c; }
.hk-btn-danger:disabled { opacity: .6; cursor: not-allowed; }

/* ── Cancel button ───────────────────────────────────────────────────────── */
.hk-btn-cancel {
    -webkit-appearance: none;
    appearance: none;
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
    padding: 11px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: background .15s;
}
.hk-btn-cancel:hover { background: #e5e7eb; }
.hk-btn-cancel:disabled { opacity: .6; cursor: not-allowed; }

/* ═══════════════════════════════════════════════════════════════════════════
   MAP: HEART BUTTON  (shown in popups + list-view cards)
   ═══════════════════════════════════════════════════════════════════════════ */

.hk-heart-btn {
    -webkit-appearance: none;
    appearance: none;
    background: rgba(255,255,255,.92);
    border: 1.5px solid #e5e7eb;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    padding: 0;
    outline: none;
    transition: background .15s, border-color .15s, transform .12s;
    flex-shrink: 0;
    color: #9ca3af;
    -webkit-tap-highlight-color: transparent;
}
.hk-heart-btn:hover {
    background: #fff1f2;
    border-color: #fca5a5;
    color: #ef4444;
    transform: scale(1.12);
}
.hk-heart-btn.is-saved {
    background: #fff1f2;
    border-color: #fca5a5;
    color: #ef4444;
}
.hk-heart-btn.is-saved:hover { transform: scale(1.12); }

/* Heart inside the popup: positioned top-right over the image */
.hk-popup-heart {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 10;
}

/* Heart in list-view cards: right-aligned in the card row */
.hk-list-view-card .hk-heart-btn {
    margin-left: auto;
    flex-shrink: 0;
}

/* ── "Save to favourites" login nudge modal ──────────────────────────────── */
.hk-fav-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 20000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}
.hk-fav-modal {
    background: #fff;
    border-radius: 14px;
    padding: 28px 24px 24px;
    max-width: 340px;
    width: 100%;
    text-align: center;
    box-shadow: 0 16px 48px rgba(0,0,0,.22);
    animation: hkFavModalIn .18s ease;
}
@keyframes hkFavModalIn {
    from { opacity: 0; transform: scale(.92); }
    to   { opacity: 1; transform: scale(1);   }
}
.hk-fav-modal-icon {
    font-size: 36px;
    margin-bottom: 12px;
    line-height: 1;
}
.hk-fav-modal h3 {
    margin: 0 0 8px;
    font-size: 17px;
    font-weight: 700;
    color: #111827;
}
.hk-fav-modal p {
    margin: 0 0 20px;
    font-size: 14px;
    color: #6b7280;
    line-height: 1.5;
}
.hk-fav-modal-btns {
    display: flex;
    gap: 10px;
    justify-content: center;
}
.hk-fav-modal-btn {
    flex: 1;
    padding: 11px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    border: none;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    transition: background .15s, opacity .15s;
}
.hk-fav-modal-btn--primary {
    background: #1e7a34;
    color: #fff;
}
.hk-fav-modal-btn--primary:hover { background: #155c27; color: #fff; }
.hk-fav-modal-btn--secondary {
    background: #f3f4f6;
    color: #374151;
}
.hk-fav-modal-btn--secondary:hover { background: #e5e7eb; }
.hk-fav-modal-close {
    position: absolute;
    top: 12px;
    right: 14px;
    background: none;
    border: none;
    font-size: 20px;
    color: #9ca3af;
    cursor: pointer;
    line-height: 1;
    padding: 4px;
}

/* ── Favourites count badge in mobile action bar ─────────────────────────── */
.hk-fav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ef4444;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    border-radius: 20px;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 4px;
    line-height: 1;
    vertical-align: middle;
}

/* Desktop: hide the mobile-only badge */
@media (min-width: 769px) {
    .hk-fav-badge { display: none; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   AUTH SPLIT LAYOUT
   Used by: [hk_visitor_login], [hk_visitor_register], [hk_landlord_register]

   KEY TECHNIQUE: position:fixed + inset:0 takes the wrapper completely out of
   the normal document flow and pins it to the viewport corners, bypassing all
   of Astra's padding/max-width/overflow constraints on #page, .entry-content,
   etc. z-index:99999 ensures it sits above every theme layer.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── 1. Page wrapper — fixed full-viewport overlay ───────────────────────── */
.hk-auth-page {
    position: fixed;
    inset: 0;                  /* top:0; right:0; bottom:0; left:0  */
    z-index: 99999;
    display: flex;
    font-family: var(--hk-font, 'Plus Jakarta Sans', system-ui, sans-serif);
    background: #fff;
}
.hk-auth-page * { box-sizing: border-box; }

/* Prevent the page behind the overlay from scrolling */
body:has(.hk-auth-page),
body.hk-auth-active { overflow: hidden !important; }

/* ── 2. Hide theme chrome (header, footer, page title) ───────────────────── */
/* :has() handles modern browsers without any flash.                          */
/* body.hk-auth-active is the synchronous-JS fallback for older browsers.     */
body:has(.hk-auth-page) .site-header,
body:has(.hk-auth-page) #masthead,
body:has(.hk-auth-page) header.site-header,
body:has(.hk-auth-page) #ast-desktop-header,
body:has(.hk-auth-page) .ast-masthead-custom-spacing,
body:has(.hk-auth-page) .site-footer,
body:has(.hk-auth-page) #colophon,
body:has(.hk-auth-page) .entry-title,
body:has(.hk-auth-page) h1.page-title,
body:has(.hk-auth-page) .page-header,
body:has(.hk-auth-page) .ast-page-title-wrap,
body:has(.hk-auth-page) .ast-page-title-bar,
body.hk-auth-active .site-header,
body.hk-auth-active #masthead,
body.hk-auth-active header.site-header,
body.hk-auth-active #ast-desktop-header,
body.hk-auth-active .ast-masthead-custom-spacing,
body.hk-auth-active .site-footer,
body.hk-auth-active #colophon,
body.hk-auth-active .entry-title,
body.hk-auth-active h1.page-title,
body.hk-auth-active .page-header,
body.hk-auth-active .ast-page-title-wrap,
body.hk-auth-active .ast-page-title-bar { display: none !important; }

/* ── 3. Left green branding panel — 40%, desktop only ───────────────────── */
.hk-auth-brand {
    display: none;  /* hidden on mobile — right panel fills full width */
}
@media (min-width: 769px) {
    .hk-auth-brand {
        display: flex;
        flex-direction: column;
        justify-content: center;
        width: 40%;
        flex-shrink: 0;
        background: #1a5c38;
        padding: 60px 56px;
        position: relative;
        overflow: hidden;
    }
}

.hk-auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: 21px;
    font-weight: 800;
    color: #fff;
    text-decoration: none;
    margin-bottom: 48px;
    letter-spacing: -.3px;
    position: relative;
    z-index: 1;
}
.hk-auth-brand-logo span { color: #86efac; }
.hk-auth-brand-logo:hover,
.hk-auth-brand-logo:focus { color: #fff; opacity: .9; text-decoration: none; }

.hk-auth-brand-tagline {
    font-size: clamp(22px, 2.4vw, 28px);
    font-weight: 700;
    color: #fff;
    line-height: 1.45;
    margin: 0;
    position: relative;
    z-index: 1;
}

/* Decorative translucent circles */
.hk-auth-brand::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -90px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .06);
    pointer-events: none;
}
.hk-auth-brand::after {
    content: '';
    position: absolute;
    bottom: -130px;
    left: -80px;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .04);
    pointer-events: none;
}

/* ── 4. Right white form panel — 60%, scrollable ─────────────────────────── */
.hk-auth-panel {
    flex: 1;
    min-height: 0;        /* allow flex shrinking so overflow-y:auto works */
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 48px 24px;
    background: #fff;
}
@media (min-width: 769px) {
    .hk-auth-panel { padding: 48px 64px; }
}

.hk-auth-inner {
    width: 100%;
    max-width: 420px;
    margin-top: auto;     /* margin:auto on a flex item absorbs all free space */
    margin-bottom: auto;  /* equally above and below → reliable vertical centre */
}

/* ── 5. Mobile-only logo (replaces hidden left panel) ────────────────────── */
.hk-auth-mobile-logo {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 17px;
    font-weight: 800;
    color: #1a5c38;
    text-decoration: none;
    margin-bottom: 28px;
}
.hk-auth-mobile-logo:hover { color: #155c27; text-decoration: none; }
@media (min-width: 769px) {
    .hk-auth-mobile-logo { display: none !important; }
}

/* ── 6. Inner headings and sub-text ──────────────────────────────────────── */
.hk-auth-inner h2 {
    margin: 0 0 6px;
    font-size: 23px;
    font-weight: 700;
    color: #111827;
}
.hk-auth-inner .hk-auth-sub {
    margin: 0 0 26px;
    color: #6b7280;
    font-size: 14px;
    line-height: 1.5;
}

/* ── 7. Full-width submit button inside the auth layout ──────────────────── */
.hk-auth-inner .hk-btn-submit-big {
    width: 100%;
    max-width: 100%;
    margin-top: 4px;
}

/* ── 8. Push content below the absolutely-positioned plugin nav bar ──────── */
.hk-auth-page { padding-top: 52px; }
