/* ---------------------------------------------------------
   LAYOUT: MAP + SIDEBAR
--------------------------------------------------------- */

.map-layout {
    display: flex;
    height: calc(100vh - 70px); /* header height accounted for */
    overflow: hidden;
}

/* SIDEBAR */

.map-sidebar {
    width: 360px;
    background: #0f172a;
    border-right: 1px solid rgba(148,163,184,0.25);
    overflow-y: auto;
    padding: 20px 16px;
    box-shadow: 4px 0 20px rgba(0,0,0,0.4);
}

.sidebar-header {
    margin-bottom: 18px;
}

.sidebar-title {
    font-family: 'Special Elite', system-ui, sans-serif;
    font-size: 20px;
    margin: 0 0 4px;
    color: #f9fafb;
}

.sidebar-subtitle {
    margin: 0;
    font-size: 13px;
    color: #9ca3af;
}

.sidebar-loading {
    color: #9ca3af;
    font-size: 14px;
    padding: 10px 0;
}

.sidebar-cases {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* MAP */

.map-container {
    flex: 1;
    position: relative;
}

.map-element {
    position: absolute;
    inset: 0;
}

/* ---------------------------------------------------------
   CASEFILE PANEL (DUPLICATED FROM HOMEPAGE/CASES.PHP)
--------------------------------------------------------- */

.casefile-panel {
    position: relative;
    background: #020617;
    border-radius: 10px;
    border: 1px solid rgba(148,163,184,0.35);
    box-shadow:
        0 18px 40px rgba(0,0,0,0.85),
        0 0 0 1px rgba(15,23,42,0.9);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.casefile-panel::before {
    content: "";
    position: absolute;
    left: 0;
    top: 18px;
    bottom: 18px;
    width: 3px;
    background: linear-gradient(to bottom, #b91c1c, #f97373);
    opacity: 0.9;
}

/* TAB */

.casefile-tab {
    position: relative;
    background: linear-gradient(90deg, #020617, #111827);
    padding: 6px 12px 6px 18px;
    border-bottom: 1px solid rgba(148,163,184,0.3);
    font-family: 'Special Elite', system-ui, sans-serif;
    font-size: 11px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #e5e7eb;
}

/* BODY */

.casefile-body {
    position: relative;
    padding: 14px 16px 10px 22px;
    background-image: linear-gradient(
        to bottom,
        rgba(15,23,42,0.9),
        rgba(15,23,42,0.98)
    );
}

/* FLEX LAYOUT FOR THUMB + TEXT */

.casefile-body-flex {
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

/* THUMBNAIL */

.casefile-thumb {
    width: 120px;
    height: 120px;
    border-radius: 6px;
    overflow: hidden;
    background: #111;
    flex-shrink: 0;
}

.casefile-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* TEXT BLOCK */

.casefile-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.casefile-title {
    font-family: 'Special Elite', system-ui, sans-serif;
    font-size: 16px;
    margin: 0;
    color: #f9fafb;
}

.casefile-title a {
    color: inherit;
    text-decoration: none;
}

.casefile-title a:hover {
    text-decoration: underline;
}

.casefile-meta {
    font-size: 13px;
    color: #e5e7eb;
    margin: 0;
}

.casefile-meta span {
    color: #f97373;
}

.casefile-location {
    font-size: 12px;
    color: #9ca3af;
    margin: 0;
}

/* FOOTER */

.casefile-footer {
    padding: 10px 0 0;
    margin-top: auto;
}

.casefile-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 6px 12px;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    border-radius: 999px;
    border: 1px solid rgba(248,113,113,0.8);
    color: #fecaca;
    background: radial-gradient(circle at top, rgba(248,113,113,0.18), rgba(127,29,29,0.9));
    text-decoration: none;
    box-shadow: 0 0 12px rgba(248,113,113,0.5);
    transition: transform 0.12s ease, box-shadow 0.12s ease, background 0.12s ease;
}

.casefile-button:hover {
    transform: translateY(-1px);
    box-shadow: 0 0 18px rgba(248,113,113,0.8);
    background: radial-gradient(circle at top, rgba(248,113,113,0.25), rgba(127,29,29,1));
}

/* ---------------------------------------------------------
   RESPONSIVE
--------------------------------------------------------- */

@media (max-width: 900px) {
    .map-layout {
        flex-direction: column;
    }

    .map-sidebar {
        width: 100%;
        height: 320px;
        border-right: none;
        border-bottom: 1px solid rgba(148,163,184,0.25);
    }

    .map-container {
        flex: 1;
        height: calc(100vh - 70px - 320px);
    }
}
