:root {
    --pa-navy: #0f172a;
    --pa-ink: #1e293b;
    --pa-muted: #64748b;
    --pa-line: #e2e8f0;
    --pa-bg: #f8fafc;
    --pa-card: #ffffff;
    --pa-gold: #b45309;
    --pa-gold-soft: #f59e0b;
    --pa-available: #16a34a;
    --pa-reserved: #d97706;
    --pa-sold: #dc2626;
    --pa-hold: #2563eb;
    --pa-font: 'DM Sans', sans-serif;
    --pa-display: 'Outfit', sans-serif;
    --pa-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
    height: 100%;
}

.plot-availability-page {
    font-family: var(--pa-font);
    color: var(--pa-ink);
    background: #4a4a4a;
    min-height: 100vh;
    min-height: 100dvh;
    height: 100vh;
    height: 100dvh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Fit cleanly inside client-site <iframe> embeds */
.plot-availability-page.is-embed {
    min-height: 100%;
    height: 100%;
}

.pa-status-bar {
    flex: 0 0 auto;
    padding: 6px 14px;
    background: #ffffff;
    border-bottom: 1px solid var(--pa-line);
}

.pa-status-bar__inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 6px;
    max-width: 980px;
    margin: 0 auto;
}

.pa-stat {
    appearance: none;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 4px 12px 4px 10px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font: inherit;
    cursor: pointer;
    transition: filter 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
    min-height: 30px;
    line-height: 1;
}

.pa-stat.total {
    cursor: default;
    background: #0f172a;
    border-color: #0f172a;
    color: #fff;
    padding-left: 12px;
    padding-right: 14px;
}

.pa-stat:not(.total):hover {
    filter: brightness(0.97);
    transform: translateY(-1px);
}

.pa-stat.is-active {
    box-shadow: 0 0 0 2px rgba(15, 23, 42, 0.12);
    transform: translateY(-1px);
}

.pa-stat__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex: 0 0 auto;
    display: inline-block;
    font-style: normal;
    background: currentColor;
}

.pa-stat.available {
    color: #166534;
    background: #dcfce7;
    border-color: #86efac;
}
.pa-stat.available .pa-stat__dot { background: #16a34a; }
.pa-stat.available.is-active { background: #bbf7d0; border-color: #16a34a; }

.pa-stat.reserved {
    color: #9a3412;
    background: #ffedd5;
    border-color: #fdba74;
}
.pa-stat.reserved .pa-stat__dot { background: #ea580c; }
.pa-stat.reserved.is-active { background: #fed7aa; border-color: #ea580c; }

.pa-stat.hold {
    color: #1e40af;
    background: #dbeafe;
    border-color: #93c5fd;
}
.pa-stat.hold .pa-stat__dot { background: #2563eb; }
.pa-stat.hold.is-active { background: #bfdbfe; border-color: #2563eb; }

.pa-stat.sold {
    color: #991b1b;
    background: #fee2e2;
    border-color: #fca5a5;
}
.pa-stat.sold .pa-stat__dot { background: #dc2626; }
.pa-stat.sold.is-active { background: #fecaca; border-color: #dc2626; }

.pa-stat__value {
    font-family: var(--pa-display);
    font-size: 0.98rem;
    font-weight: 700;
    line-height: 1;
    color: inherit;
    font-variant-numeric: tabular-nums;
    transition: transform 0.2s ease;
}

.pa-stat.total .pa-stat__value {
    color: #fff;
    font-size: 1rem;
}

.pa-stat__value.is-updating {
    transform: scale(1.05);
}

.pa-stat__label {
    font-size: 12px;
    font-weight: 600;
    color: inherit;
    opacity: 0.9;
    white-space: nowrap;
}

.pa-stat.total .pa-stat__label {
    color: rgba(255, 255, 255, 0.8);
    opacity: 1;
}

.pa-stat__divider {
    width: 1px;
    height: 18px;
    background: #e2e8f0;
    margin: 0 2px;
}

.pa-status-bar__hint {
    display: none;
}

@media (max-width: 640px) {
    .pa-status-bar {
        padding: 5px 8px;
    }

    .pa-status-bar__inner {
        gap: 5px;
    }

    .pa-stat {
        padding: 4px 10px;
        min-height: 28px;
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
    }

    .pa-stat.total {
        flex: 1 1 100%;
        justify-content: center;
    }

    .pa-stat__divider {
        display: none;
    }

    .pa-stat__value {
        font-size: 0.92rem;
    }

    .pa-stat__label {
        font-size: 11px;
    }
}

.pa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px 18px;
    padding: 14px 24px;
    background: rgba(255,255,255,0.96);
    border-bottom: 1px solid var(--pa-line);
    backdrop-filter: blur(8px);
    position: sticky;
    top: 0;
    z-index: 40;
    flex: 0 0 auto;
}

.pa-header__brand {
    display: flex;
    align-items: center;
    gap: 14px;
    flex: 0 0 auto;
}

.pa-header__logo {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
}

.pa-header__logo.is-platform {
    background: #0b1c34;
    border-radius: 10px;
    padding: 6px 10px;
}

.pa-header__logo img {
    display: block;
    height: 48px;
    width: auto;
    max-width: 180px;
    object-fit: contain;
}

.pa-header__logo.is-client img {
    height: 52px;
}

.pa-eyebrow {
    margin: 0;
    font-size: 12px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--pa-gold);
    font-weight: 700;
}

.pa-header h1 {
    margin: 2px 0 0;
    font-family: var(--pa-display);
    font-size: clamp(1.05rem, 2vw, 1.45rem);
    font-weight: 700;
    color: var(--pa-navy);
}

.pa-header__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    flex: 1 1 420px;
    justify-content: center;
}

.pa-header__actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 0 auto;
    margin-left: auto;
}

.pa-preview-badge {
    background: #fff7ed;
    color: var(--pa-gold);
    border: 1px solid #fed7aa;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pa-link {
    color: var(--pa-navy);
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
}

.pa-search__row {
    display: flex;
    gap: 8px;
}

.pa-search input {
    width: min(180px, 42vw);
    border: 1px solid var(--pa-line);
    border-radius: 10px;
    padding: 9px 12px;
    font: inherit;
    background: #fff;
}

.pa-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.pa-filter,
.pa-btn,
.pa-icon-btn {
    border: 1px solid var(--pa-line);
    background: #fff;
    color: var(--pa-ink);
    border-radius: 10px;
    padding: 8px 12px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
}

.pa-filter.active,
.pa-btn--primary {
    background: var(--pa-navy);
    border-color: var(--pa-navy);
    color: #fff;
}

.pa-btn--block {
    width: 100%;
    text-align: center;
    text-decoration: none;
    display: inline-flex;
    justify-content: center;
}

.pa-legend--nav {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 14px;
    padding: 0;
    color: var(--pa-muted);
    font-size: 12px;
    font-weight: 600;
}

.pa-legend__item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.pa-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
}

.pa-dot.available { background: var(--pa-available); }
.pa-dot.reserved { background: var(--pa-reserved); }
.pa-dot.sold { background: var(--pa-sold); }
.pa-dot.on-hold { background: var(--pa-hold); }

.pa-main {
    padding: 10px 12px 12px;
    flex: 1 1 auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
}

.pa-credit {
    flex: 0 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    background: #0b1c34;
    color: rgba(255, 255, 255, 0.78);
    font-size: 12px;
    letter-spacing: 0.02em;
    text-align: center;
}

.pa-credit p {
    margin: 0;
}

.pa-credit a {
    color: #f59e0b;
    font-weight: 700;
    text-decoration: none;
}

.pa-credit a:hover {
    color: #fbbf24;
    text-decoration: underline;
}

.pa-map-shell {
    position: relative;
    display: grid;
    grid-template-columns: 22px 1fr;
    grid-template-rows: minmax(0, 1fr) 22px;
    width: 100%;
    flex: 1 1 auto;
    min-height: 0;
    height: 100%;
    border-radius: 14px;
    border: 1px solid var(--pa-line);
    background: #ffffff;
    box-shadow: var(--pa-shadow);
    overflow: hidden;
}

.pa-viewport {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background: #ffffff;
    touch-action: none;
    cursor: grab;
}

.pa-viewport.is-panning {
    cursor: grabbing;
}

.pa-zoom-float {
    grid-column: 2;
    grid-row: 1;
    place-self: end;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0 14px 14px 0;
    pointer-events: auto;
}

.pa-zoom-float .pa-icon-btn {
    width: 42px;
    height: 42px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    line-height: 1;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 4px 14px rgba(15, 23, 42, 0.16);
}

.pa-zoom-float .pa-icon-btn:hover {
    background: var(--pa-navy);
    border-color: var(--pa-navy);
    color: #fff;
}

.pa-stage {
    width: max-content;
    height: max-content;
    transform-origin: 0 0;
    will-change: transform;
}

.pa-layout-container {
    position: relative;
    width: max-content;
    height: max-content;
    display: block;
    background: #ffffff;
}

.pa-layout-container img {
    max-width: none;
    max-height: none;
    width: auto;
    height: auto;
    display: block;
    user-select: none;
    pointer-events: none;
    image-rendering: auto;
    -ms-interpolation-mode: bicubic;
}

.plot-overlay {
    position: absolute;
    left: 0;
    top: 0;
    transform: none;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    overflow: visible;
}

.pa-scroller {
    background: #f1f5f9;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pa-scroller--y {
    grid-column: 1;
    grid-row: 1;
    border-right: 1px solid var(--pa-line);
    position: relative;
    overflow: hidden;
}

.pa-scroller--x {
    grid-column: 2;
    grid-row: 2;
    border-top: 1px solid var(--pa-line);
    padding: 0 6px;
}

.pa-scroller-corner {
    grid-column: 1;
    grid-row: 2;
    background: #e2e8f0;
    border-top: 1px solid var(--pa-line);
    border-right: 1px solid var(--pa-line);
}

.pa-scroller input[type="range"] {
    -webkit-appearance: none;
    appearance: none;
    background: transparent;
    margin: 0;
    cursor: pointer;
}

.pa-scroller--x input[type="range"] {
    width: 100%;
    height: 14px;
}

.pa-scroller--y input[type="range"] {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 100%;
    height: 14px;
    transform: translate(-50%, -50%) rotate(-90deg);
    transform-origin: center;
}

.pa-scroller input[type="range"]::-webkit-slider-runnable-track {
    height: 6px;
    background: #cbd5e1;
    border-radius: 999px;
}

.pa-scroller input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 14px;
    height: 14px;
    margin-top: -4px;
    border-radius: 50%;
    background: #0f172a;
    border: 2px solid #fff;
    box-shadow: 0 1px 4px rgba(15, 23, 42, 0.25);
}

.pa-scroller input[type="range"]::-moz-range-track {
    height: 6px;
    background: #cbd5e1;
    border-radius: 999px;
}

.pa-scroller input[type="range"]::-moz-range-thumb {
    width: 14px;
    height: 14px;
    border: 2px solid #fff;
    border-radius: 50%;
    background: #0f172a;
}

.pa-scroller input[type="range"]:disabled {
    opacity: 0.35;
    cursor: default;
}

.plot-overlay .plot-shape {
    cursor: pointer;
    stroke-width: 2;
    transition: fill 0.15s ease, stroke-width 0.15s ease, opacity 0.15s ease;
}

.plot-overlay .plot-shape:hover,
.plot-overlay .plot-shape.is-hover {
    stroke-width: 3.5;
    filter: brightness(1.05);
}

.plot-overlay .plot-shape.is-active {
    stroke-width: 4;
    stroke: #0f172a;
}

.plot-overlay .plot-shape.is-dimmed {
    opacity: 0.18;
    pointer-events: none;
}

.pa-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--pa-muted);
}

.pa-empty i {
    font-size: 42px;
    margin-bottom: 16px;
    color: var(--pa-gold-soft);
}

.pa-hover-popup {
    position: fixed;
    z-index: 70;
    pointer-events: none;
    width: min(280px, calc(100vw - 24px));
    background: #fff;
    color: var(--pa-ink);
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--pa-line);
    box-shadow: 0 16px 40px rgba(15, 23, 42, 0.18);
}

.pa-hover-popup h3 {
    margin: 0 0 10px;
    font-family: var(--pa-display);
    font-size: 1.1rem;
    color: var(--pa-navy);
}

.pa-hover-popup__details {
    margin: 0;
    display: grid;
    gap: 8px;
}

.pa-hover-popup__details div {
    display: grid;
    grid-template-columns: 88px 1fr;
    gap: 6px;
    font-size: 13px;
}

.pa-hover-popup__details dt {
    color: var(--pa-muted);
    font-weight: 600;
}

.pa-hover-popup__details dd {
    margin: 0;
    font-weight: 700;
}

.pa-modal {
    position: fixed;
    inset: 0;
    z-index: 80;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.pa-modal[hidden],
.pa-hover-popup[hidden],
.pa-toast[hidden] {
    display: none !important;
}

.pa-modal__card {
    width: min(420px, 100%);
    background: #fff;
    border-radius: 18px;
    padding: 24px;
    box-shadow: var(--pa-shadow);
    position: relative;
    border: 1px solid var(--pa-line);
}

.pa-modal__close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    color: var(--pa-muted);
}

.pa-modal__card h2 {
    margin: 0 0 16px;
    font-family: var(--pa-display);
    font-size: 1.5rem;
    color: var(--pa-navy);
}

.pa-modal__details {
    margin: 0 0 20px;
    display: grid;
    gap: 12px;
}

.pa-modal__details div {
    display: grid;
    grid-template-columns: 110px 1fr;
    gap: 8px;
    padding-bottom: 10px;
    border-bottom: 1px solid #f1f5f9;
}

.pa-modal__details dt {
    color: var(--pa-muted);
    font-size: 13px;
    font-weight: 600;
}

.pa-modal__details dd {
    margin: 0;
    font-weight: 700;
}

.pa-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
}

.pa-toast {
    position: fixed;
    left: 50%;
    bottom: 42px;
    transform: translateX(-50%);
    z-index: 90;
    background: var(--pa-navy);
    color: #fff;
    padding: 12px 18px;
    border-radius: 12px;
    font-size: 14px;
    box-shadow: var(--pa-shadow);
}

/* Homepage CTA */
.vb-check-availability {
    text-align: center;
    padding: 48px 20px 20px;
}

.vb-check-availability__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: min(420px, 100%);
    padding: 18px 34px;
    border: 0;
    border-radius: 6px;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 55%, #b45309 160%);
    color: #fff;
    font-family: var(--pa-display), 'Outfit', sans-serif;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    text-decoration: none;
    box-shadow: 0 14px 34px rgba(15, 23, 42, 0.22);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    cursor: pointer;
}

.vb-check-availability__btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(15, 23, 42, 0.28);
    color: #fff;
}

.vb-check-availability__btn[hidden],
.vb-check-availability__btn.is-disabled {
    opacity: 0.45;
    pointer-events: none;
}

@media (max-width: 1024px) {
    .pa-toolbar {
        grid-template-columns: 1fr;
    }

    .pa-zoom-controls {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .pa-header {
        padding: 14px 16px;
        align-items: flex-start;
        flex-direction: column;
    }

    .pa-header__controls,
    .pa-header__actions {
        width: 100%;
        justify-content: flex-start;
        margin-left: 0;
    }

    .pa-main {
        padding: 8px;
    }

    .pa-map-shell {
        border-radius: 12px;
    }

    .pa-modal__details div {
        grid-template-columns: 1fr;
    }

    .pa-filter,
    .pa-btn {
        min-height: 44px;
    }
}
