/*
 * map-integration.css — Leaflet Interactive Map Styles
 * Batch 59: Subject property, comp, suggested comp markers,
 *           Fit All control, empty state overlay, popup overrides.
 *
 * Zero hardcoded colors except brand marker colors:
 *   Subject gold:  #FDA929 (brand gold)
 *   Comp navy:     #134160 (brand navy)
 *   Suggest amber: rgba(253,169,41,0.70) (gold at 70% opacity)
 * All other values use CSS vars from base.css / theme-light.css.
 */

/* ============================================================
   MAP CONTAINER
   ============================================================ */
.fdcc-map-container {
    flex: 1;
    min-height: 320px;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    position: relative;   /* needed for empty-state absolute overlay */
    background: var(--surface-card);
}

/* Allow Leaflet to fill the container fully */
.fdcc-map-container .leaflet-container {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border-radius: 12px;
    font-family: var(--font-heading);
    background: var(--glass-bg);
}

/* ============================================================
   SUBJECT PROPERTY MARKER — gold 20px circle
   ============================================================ */
.fdcc-marker-subject {
    width: 20px !important;
    height: 20px !important;
    background: #FDA929;                /* brand gold — intentional hardcode */
    border: 2px solid #134160;          /* brand navy — intentional hardcode */
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(253, 169, 41, 0.45);
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.fdcc-marker-subject:hover {
    transform: scale(1.25);
    box-shadow: 0 3px 10px rgba(253, 169, 41, 0.60);
}

/* ============================================================
   COMP MARKER — navy 14px circle
   ============================================================ */
.fdcc-marker-comp {
    width: 14px !important;
    height: 14px !important;
    background: #134160;                /* brand navy — intentional hardcode */
    border: 2px solid #ffffff;
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(19, 65, 96, 0.35);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.fdcc-marker-comp:hover {
    transform: scale(1.3);
}

/* ============================================================
   SUGGESTED COMP MARKER — amber 14px dashed border
   ============================================================ */
.fdcc-marker-suggest {
    width: 14px !important;
    height: 14px !important;
    background: rgba(253, 169, 41, 0.70); /* brand gold at 70% — intentional */
    border: 2px dashed #134160;            /* brand navy — intentional */
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(253, 169, 41, 0.30);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.fdcc-marker-suggest:hover {
    transform: scale(1.3);
}

/* ============================================================
   FIT ALL CONTROL BUTTON
   ============================================================ */
.fdcc-map-fit-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px 10px;
    background: #ffffff;
    color: #134160;                     /* brand navy */
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    font-family: var(--font-heading);
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.10);
    transition: all 0.15s ease;
    white-space: nowrap;
    margin: 8px 8px 0 0;
}

.fdcc-map-fit-btn:hover {
    background: var(--glass-bg);
    border-color: #134160;
    box-shadow: 0 2px 8px rgba(19, 65, 96, 0.15);
}

/* Leaflet control container: no default background behind our button */
.leaflet-top.leaflet-right .leaflet-control {
    background: transparent;
    border: none;
    box-shadow: none;
}

/* ============================================================
   EMPTY STATE OVERLAY
   ============================================================ */
.fdcc-map-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 500;                       /* above Leaflet tiles (z-index 400) */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 16px 20px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.12);
    pointer-events: none;
    min-width: 180px;
}

.fdcc-map-empty__text {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 500;
    color: #134160;                     /* brand navy */
    line-height: 1.4;
}

/* ============================================================
   LEAFLET POPUP OVERRIDES
   ============================================================ */
.leaflet-popup-content-wrapper {
    border-radius: 10px !important;
    font-family: var(--font-heading) !important;
    font-size: 0.78rem !important;
    padding: 0 !important;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.14) !important;
    border: 1px solid var(--glass-border) !important;
}

.leaflet-popup-content {
    margin: 0 !important;
}

.leaflet-popup-tip-container {
    margin-top: -1px;
}

/* Popup inner content */
.fdcc-popup {
    padding: 10px 12px;
    line-height: 1.5;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    color: var(--text-primary);
    min-width: 140px;
}

.fdcc-popup strong {
    display: block;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.fdcc-popup span {
    color: var(--text-secondary);
    font-size: 0.72rem;
}

.fdcc-popup__badge {
    display: inline-block;
    padding: 2px 7px;
    border-radius: 999px;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    background: var(--gold-alpha-20);
    color: #b8771a;                     /* contrast-safe gold from Batch 57 */
    border: 1px solid var(--gold-alpha-30);
    margin-bottom: 4px;
}

.fdcc-popup__badge--suggest {
    background: rgba(253, 169, 41, 0.12);
    color: #b8771a;
    border-color: rgba(253, 169, 41, 0.28);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
    .fdcc-map-container {
        min-height: 240px;
    }

    .fdcc-map-container .leaflet-container {
        min-height: 240px;
    }
}
