/* ============================================================================
   FYSH — Listing floor plans — buyer-side stylesheet
   CR: fysh_floor_plan_studio  2026-07-17
   Used by the floor-plans section on public/listing.php.
============================================================================ */
.lfp {
    margin: 40px 0;
    background: var(--cream, #F6F5F2);
    border-radius: 12px;
    padding: 32px;
}

.lfp__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.lfp__heading {
    font-family: 'Playfair Display', 'Georgia', serif;
    color: var(--navy, #0F2340);
    font-weight: 700;
    font-size: 26px;
    margin: 0;
    line-height: 1.1;
}

.lfp__summary {
    font-size: 13px;
    color: var(--muted, #6B7A8D);
    background: #FFFFFF;
    padding: 6px 14px;
    border-radius: 999px;
    border: 1px solid var(--border, #E2E8F0);
}
.lfp__summary strong { color: var(--navy, #0F2340); font-weight: 600; }
.lfp__summary-sep { color: var(--border, #E2E8F0); margin: 0 4px; }

/* Tab strip */
.lfp__tabs {
    display: flex;
    gap: 4px;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border, #E2E8F0);
    overflow-x: auto;
    scrollbar-width: thin;
}
.lfp__tab {
    background: transparent;
    border: 1px solid transparent;
    border-bottom: 3px solid transparent;
    padding: 12px 18px;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
    color: var(--muted, #6B7A8D);
    border-radius: 6px 6px 0 0;
    transition: all 0.15s ease;
    white-space: nowrap;
    margin-bottom: -2px;   /* overlap the strip border */
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    min-width: 110px;
}
.lfp__tab:hover {
    color: var(--navy, #0F2340);
    background: rgba(255,255,255,0.6);
}
.lfp__tab.is-active {
    background: var(--navy, #0F2340);
    color: #FFFFFF;
    border-bottom-color: var(--gold, #C9A84C);
}
.lfp__tab.is-active .lfp__tab-gia { color: rgba(255,255,255,0.75); }

.lfp__tab-name {
    font-family: 'Playfair Display', 'Georgia', serif;
    font-weight: 600;
    font-size: 15px;
}
.lfp__tab-gia { font-size: 11px; color: var(--muted, #6B7A8D); }

/* Viewports */
.lfp__viewports { position: relative; }
.lfp__panel {
    display: none;
    animation: lfp-fade 0.18s ease;
}
.lfp__panel.is-active { display: block; }
.lfp__panel[hidden] { display: none; }
.lfp__panel.is-active[hidden] { display: block; }

@keyframes lfp-fade {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.lfp__viewport {
    background: #FFFFFF;
    border: 1px solid var(--border, #E2E8F0);
    border-radius: 8px;
    padding: 24px;
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 380px;
    max-height: 720px;
    overflow: hidden;
}
.lfp__viewport svg {
    width: 100%;
    height: auto;
    max-height: 680px;
    display: block;
}
.lfp__expand {
    position: absolute;
    top: 12px;
    right: 12px;
    background: rgba(15, 35, 64, 0.85);
    color: #FFFFFF;
    border: none;
    width: 34px;
    height: 34px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s ease;
    z-index: 2;
    font-family: inherit;
}
.lfp__expand:hover { background: var(--navy, #0F2340); transform: scale(1.05); }

.lfp__floor-disclaimer {
    margin: 10px 0 0;
    font-size: 11px;
    color: var(--muted, #6B7A8D);
    font-style: italic;
    text-align: center;
}

/* Lightbox */
.lfp__lightbox {
    position: fixed;
    inset: 0;
    background: rgba(15, 35, 64, 0.92);
    z-index: 9500;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    animation: lfp-fade 0.15s ease;
}
.lfp__lightbox[hidden] { display: none; }
.lfp__lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    background: transparent;
    color: #FFFFFF;
    border: 1px solid rgba(255,255,255,0.3);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 22px;
    font-family: inherit;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    transition: all 0.15s ease;
}
.lfp__lightbox-close:hover { background: rgba(255,255,255,0.1); }
.lfp__lightbox-body {
    max-width: 96vw;
    max-height: 92vh;
    background: #FFFFFF;
    border-radius: 10px;
    padding: 24px 32px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    overflow: auto;
}
.lfp__lightbox-title {
    font-family: 'Playfair Display', 'Georgia', serif;
    color: var(--navy, #0F2340);
    font-size: 22px;
    margin: 0;
}
.lfp__lightbox-svg {
    width: 100%;
    max-width: 1400px;
}
.lfp__lightbox-svg svg { width: 100%; height: auto; display: block; }

/* Print — every floor stacked vertically, no tabs */
@media print {
    .lfp { background: #FFFFFF; padding: 0; margin: 20px 0; }
    .lfp__tabs, .lfp__expand, .lfp__lightbox { display: none !important; }
    .lfp__panel { display: block !important; page-break-inside: avoid; margin-bottom: 20px; }
    .lfp__viewport { border: 1px solid #999; padding: 12px; }
}

/* Narrow screens — stacked layout (single-floor only, per spec) */
@media (max-width: 640px) {
    .lfp { padding: 20px; margin: 24px 0; }
    .lfp__heading { font-size: 20px; }
    .lfp__viewport { padding: 12px; min-height: 260px; }
}
