/* =============================================================
   ImmoTrust CI — Lot Viewer Styles
   ============================================================= */

/* ── Lot Tooltip ─────────────────────────────────────── */
.lot-tooltip-container {
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}
.lot-tooltip-container .leaflet-tooltip-content {
    margin: 0;
}
.lot-tooltip {
    padding: 8px 12px;
    font-size: 13px;
    line-height: 1.5;
}
.lot-tooltip strong {
    font-size: 14px;
    color: #2d6a4f;
}

/* ── Detail Panel (slide-in from right) ──────────────── */
#lot-detail-panel {
    position: fixed;
    top: 56px;
    right: -400px;
    width: 360px;
    max-width: 90vw;
    height: calc(100vh - 56px);
    background: #fff;
    box-shadow: -4px 0 16px rgba(0, 0, 0, 0.15);
    z-index: 1050;
    overflow-y: auto;
    transition: right 0.3s ease;
}
#lot-detail-panel.open {
    right: 0;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #dee2e6;
    background: #f8f9fa;
}
.panel-header h5 {
    margin: 0;
    color: #2d6a4f;
}
.panel-body {
    padding: 20px;
}
.panel-body .lot-ref {
    color: #6c757d;
    font-size: 14px;
}
.panel-body hr {
    margin: 12px 0;
}
.panel-body .table td {
    padding: 6px 8px;
    font-size: 14px;
}

/* ── Status badges ───────────────────────────────────── */
.badge-available, .bg-status-available { background-color: #52b788 !important; color: #fff; }
.badge-reserved, .bg-status-reserved   { background-color: #f4a261 !important; color: #fff; }
.badge-sold, .bg-status-sold           { background-color: #adb5bd !important; color: #fff; }
.badge-disputed, .bg-status-disputed   { background-color: #e63946 !important; color: #fff; }

/* ── Legend ───────────────────────────────────────────── */
.lot-legend {
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    padding: 10px 14px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-size: 13px;
    line-height: 1.6;
}
.lot-legend h6 {
    margin: 0 0 6px;
    font-size: 13px;
    font-weight: 600;
    color: #333;
}
.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
}
.legend-color {
    display: inline-block;
    width: 16px;
    height: 12px;
    border: 2px solid;
    border-radius: 3px;
}

/* ── Filter bar ──────────────────────────────────────── */
.viewer-filter-bar {
    position: absolute;
    top: 10px;
    left: 60px;
    z-index: 1000;
    display: flex;
    gap: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 8px 12px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}
.viewer-filter-bar select {
    font-size: 13px;
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid #ced4da;
}

/* ── Map container ───────────────────────────────────── */
#lot-viewer-map {
    height: calc(100vh - 56px);
    width: 100%;
}

/* ── Mobile responsive ───────────────────────────────── */
@media (max-width: 768px) {
    #lot-detail-panel {
        width: 100vw;
        right: -100vw;
    }
    .viewer-filter-bar {
        left: 10px;
        right: 10px;
        flex-wrap: wrap;
    }
}
