/* ═══════════════════════════════════════════════════════════
   Map Channels X — Site Styles
   ═══════════════════════════════════════════════════════════ */

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    font-size: 14px;
    color: #333;
    background-color: #F8F8F8;
}

a { color: dodgerblue; text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Header ──────────────────────────────────────────────── */

.mcx-header {
    background-color: dodgerblue;
    color: white;
    border-bottom: 3px solid #1A7AD4;
}

.mcx-header-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    align-items: center;
    height: 52px;
}

.mcx-logo {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: bold;
    margin-right: 32px;
    white-space: nowrap;
}
.mcx-logo:hover { text-decoration: none; }
.mcx-logo-mc { }
.mcx-logo-x {
    color: #FFD700;
    font-size: 24px;
    margin-left: 2px;
}

.mcx-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    flex: 1;
}

.mcx-nav-link {
    color: white;
    text-decoration: none;
    padding: 8px 14px;
    border-radius: 4px;
    font-size: 13px;
    transition: background-color 0.15s;
}
.mcx-nav-link:hover {
    background-color: rgba(255,255,255,0.2);
    text-decoration: none;
}

.mcx-nav-user {
    margin-left: auto;
    font-size: 13px;
    padding: 6px 12px;
    background-color: rgba(255,255,255,0.15);
    border-radius: 4px;
}

/* ─── Sub-Header (page-level nav) ─────────────────────────── */

.mcx-subheader {
    background-color: #E8F4FD;
    border-bottom: 1px solid #C8E0F0;
    padding: 0 16px;
}

.mcx-subheader-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    height: 40px;
    gap: 4px;
}

.mcx-subheader a {
    color: #1A7AD4;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 13px;
}
.mcx-subheader a:hover {
    background-color: rgba(30,120,210,0.1);
    text-decoration: none;
}
.mcx-subheader .active {
    background-color: dodgerblue;
    color: white;
}

.mcx-subheader-title {
    font-weight: bold;
    color: #333;
    margin-right: 16px;
    font-size: 14px;
}

/* ─── Main Content ────────────────────────────────────────── */

.mcx-main {
    min-height: calc(100vh - 52px - 40px);
}

.mcx-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 16px;
}

/* NEW: Full-width dashboard container */
.mcx-dashboard {
    width: 100%;
    padding: 24px 32px; /* Adds nice breathing room on the left/right */
    margin: 0 auto;
}

/* ─── Footer ──────────────────────────────────────────────── */

.mcx-footer {
    background-color: #F0F0F0;
    border-top: 1px solid #DDD;
    padding: 12px 16px;
    font-size: 12px;
    color: #888;
    text-align: center;
}
.mcx-footer a { color: #888; }

/* ─── Dashboard ───────────────────────────────────────────── */

.mcx-dash-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.mcx-dash-header h1 {
    color: dodgerblue;
    font-size: 22px;
    font-weight: bold;
}

.mcx-map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.mcx-map-card {
    background: white;
    border: 1px solid #DDD;
    border-radius: 6px;
    overflow: hidden;
    transition: box-shadow 0.15s;
}
.mcx-map-card:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.12);
}

.mcx-map-card-body {
    padding: 16px;
}

.mcx-map-card-title {
    font-size: 16px;
    font-weight: bold;
    color: #333;
    margin-bottom: 4px;
}

.mcx-map-card-desc {
    font-size: 12px;
    color: #888;
    margin-bottom: 12px;
}

.mcx-map-card-stats {
    font-size: 12px;
    color: #AAA;
    margin-bottom: 12px;
}

.mcx-map-card-actions {
    display: flex;
    gap: 8px;
}

.mcx-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #AAA;
}
.mcx-empty-state h2 {
    color: #999;
    font-size: 20px;
    margin-bottom: 8px;
}

/* ─── Buttons ─────────────────────────────────────────────── */

.btn {
    display: inline-block;
    padding: 8px 16px;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: background-color 0.15s;
}
.btn:hover { text-decoration: none; }

.btn-primary {
    background-color: dodgerblue;
    color: white;
}
.btn-primary:hover { background-color: #1A7AD4; color: white; }

.btn-success {
    background-color: #28a745;
    color: white;
}
.btn-success:hover { background-color: #218838; color: white; }

.btn-danger {
    background-color: #dc3545;
    color: white;
}
.btn-danger:hover { background-color: #c82333; color: white; }

.btn-outline {
    background-color: white;
    color: dodgerblue;
    border: 1px solid dodgerblue;
}
.btn-outline:hover { background-color: #E8F4FD; color: dodgerblue; }

.btn-sm {
    padding: 4px 10px;
    font-size: 12px;
}

/* ─── Forms ───────────────────────────────────────────────── */

.form-group {
    margin-bottom: 14px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: bold;
    color: #555;
    margin-bottom: 4px;
}

.form-control {
    width: 100%;
    padding: 8px 10px;
    border: 1px solid #CCC;
    border-radius: 4px;
    font-size: 13px;
    font-family: inherit;
}
.form-control:focus {
    outline: none;
    border-color: dodgerblue;
    box-shadow: 0 0 0 2px rgba(30,144,255,0.2);
}

textarea.form-control {
    resize: vertical;
    min-height: 60px;
}

select.form-control {
    appearance: auto;
}

/* ─── Dialog / Modal ──────────────────────────────────────── */

.mcx-dialog-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.mcx-dialog {
    background: white;
    border-radius: 8px;
    padding: 24px;
    min-width: 400px;
    max-width: 90vw;
    box-shadow: 0 8px 32px rgba(0,0,0,0.2);
}

.mcx-dialog h2 {
    color: dodgerblue;
    font-size: 18px;
    margin-bottom: 16px;
}

.mcx-dialog-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 20px;
}

/* ─── Editor Layout ───────────────────────────────────────── */

.mcx-editor {
    display: flex;
    flex: 1;
    width: 100%;
    height: 100%; /* CRITICAL: Inherit the strict height */
    min-height: 0;
    overflow: hidden; /* CRITICAL: Prevent inner items from stretching this div */
    pointer-events: none;
}



.mcx-editor-sidebar {
    width: 360px;
    min-width: 360px;
    max-width: 360px;
    flex: 0 0 360px;
    background: white;
    border-right: 1px solid #DDD;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Ensure the outer wrapper NEVER scrolls */
    pointer-events: auto;
}

.mcx-editor-sidebar-body {
    flex: 1 1 0; /* was: flex: 1  — 0 basis prevents content-size floor */
    min-height: 0;
    overflow-y: auto;
    padding: 16px;
}

.mcx-editor-sidebar-header {
    background-color: #E8F4FD;
    padding: 12px 16px;
    border-bottom: 1px solid #C8E0F0;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mcx-editor-sidebar-header h3 {
    color: dodgerblue;
    font-size: 15px;
    margin: 0;
}

.mcx-editor-map {
    flex: 1;
    position: relative;
}

.mcx-editor-toolbar {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 10;
    display: flex;
    gap: 6px;
}

.mcx-editor-toolbar .btn {
    box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.mcx-editor-status {
    position: absolute;
    bottom: 10px;
    left: 10px;
    z-index: 10;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 12px;
}

/* ─── Place List in Editor ────────────────────────────────── */

.mcx-place-list {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mcx-place-item {
    padding: 8px 10px;
    border-bottom: 1px solid #EEE;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    transition: background-color 0.1s;
}
.mcx-place-item:hover { background-color: #F5F5F5; }
.mcx-place-item.selected { background-color: #E8F4FD; }

.mcx-place-item-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    flex-shrink: 0;
}

.mcx-place-item-name { flex: 1; }

.mcx-place-item-delete {
    color: #CCC;
    cursor: pointer;
    font-size: 16px;
    padding: 0 4px;
}
.mcx-place-item-delete:hover { color: #dc3545; }

/* ─── Viewer (standalone) ─────────────────────────────────── */

.mcx-viewer {
    position: relative;
    width: 100%;
    height: 100vh;
}

.mcx-viewer-map {
    position: absolute;
    inset: 0;
}

.mcx-viewer-sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 300px;
    background: white;
    box-shadow: 2px 0 8px rgba(0,0,0,0.1);
    z-index: 10;
    display: flex;
    flex-direction: column;
}

.mcx-viewer-sidebar-header {
    background-color: dodgerblue;
    color: white;
    padding: 12px 16px;
    font-size: 15px;
    font-weight: bold;
}

.mcx-viewer-sidebar-body {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

.mcx-viewer-place {
    padding: 8px 16px;
    cursor: pointer;
    border-bottom: 1px solid #F0F0F0;
    font-size: 13px;
    transition: background-color 0.1s;
}
.mcx-viewer-place:hover { background-color: #F5F5F5; }
.mcx-viewer-place.selected { background-color: #E8F4FD; border-left: 3px solid dodgerblue; }

.mcx-viewer-place-name {
    font-weight: bold;
    color: #333;
}
.mcx-viewer-place-desc {
    font-size: 12px;
    color: #888;
    margin-top: 2px;
}

/* ─── Slimline Scrollbars ─────────────────────────────────── */

/* Firefox */
.mcx-editor-sidebar,
.mcx-editor-sidebar-body,
.mcx-viewer-sidebar-body,
.mcx-place-list-container,
.sidebar { /* Catches the MapResearch.razor sidebar */
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 transparent;
}

    /* Chrome, Edge, Safari */
    .mcx-editor-sidebar::-webkit-scrollbar,
    .mcx-editor-sidebar-body::-webkit-scrollbar,
    .mcx-viewer-sidebar-body::-webkit-scrollbar,
    .mcx-place-list-container::-webkit-scrollbar,
    .sidebar::-webkit-scrollbar {
        width: 6px; /* Makes the scrollbar thin */
    }

    .mcx-editor-sidebar::-webkit-scrollbar-track,
    .mcx-editor-sidebar-body::-webkit-scrollbar-track,
    .mcx-viewer-sidebar-body::-webkit-scrollbar-track,
    .mcx-place-list-container::-webkit-scrollbar-track,
    .sidebar::-webkit-scrollbar-track {
        background: transparent; /* Hides the track background */
    }

    .mcx-editor-sidebar::-webkit-scrollbar-thumb,
    .mcx-editor-sidebar-body::-webkit-scrollbar-thumb,
    .mcx-viewer-sidebar-body::-webkit-scrollbar-thumb,
    .mcx-place-list-container::-webkit-scrollbar-thumb,
    .sidebar::-webkit-scrollbar-thumb {
        background-color: #c1c1c1; /* Soft gray color */
        border-radius: 10px; /* Gives it nice rounded pill edges */
    }

        .mcx-editor-sidebar::-webkit-scrollbar-thumb:hover,
        .mcx-editor-sidebar-body::-webkit-scrollbar-thumb:hover,
        .mcx-viewer-sidebar-body::-webkit-scrollbar-thumb:hover,
        .mcx-place-list-container::-webkit-scrollbar-thumb:hover,
        .sidebar::-webkit-scrollbar-thumb:hover {
            background-color: #a8a8a8; /* Darkens slightly when hovered */
        }

/* ─── Utility ─────────────────────────────────────────────── */

.text-muted { color: #888; }
.text-sm { font-size: 12px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.d-flex { display: flex; }
.gap-1 { gap: 8px; }
.gap-2 { gap: 16px; }
.flex-1 { flex: 1; }

/* ─── Street View Panorama ────────────────────────────────── */

:root { --mcx-pan-sidebar-height: 180px; }

/* ═══════════════════════════════════════════════════════════
   Street View Sidebar Control — Pegman Gold Theme
   Applies in both MapEditor and MapViewer sidebars.
   Replace / merge into site.css
   ═══════════════════════════════════════════════════════════ */

/* Outer wrapper — adds a subtle border to frame the whole control */
.mcx-sv-host-wrap {
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 8px;
    border: 1px solid #c9a84c; /* warm gold border */
}

/* Mode bar — the top strip containing the label + 3 buttons */
.mcx-sv-mode-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #f5e6a3; /* light pegman gold */
    padding: 5px 8px;
    gap: 6px;
}

/* "Street View" label */
.mcx-sv-mode-label {
    font-size: 11px;
    font-weight: 700;
    color: #1a1a1a; /* black foreground */
    letter-spacing: 0.04em;
    white-space: nowrap;
    flex-shrink: 0;
}

/* Button group */
.mcx-sv-mode-btns {
    display: flex;
    gap: 3px;
}

/* Individual mode buttons */
.mcx-sv-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 7px;
    border: 1px solid #c9a84c; /* gold border */
    border-radius: 4px;
    background: transparent;
    color: #1a1a1a; /* black text/icons */
    font-size: 11px;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
    white-space: nowrap;
}

    .mcx-sv-btn:hover {
        background: #edd97a; /* slightly deeper gold on hover */
        border-color: #b8920e;
    }

    /* Selected / active button — light blue highlight */
    .mcx-sv-btn.active {
        background: #d0e8ff; /* light blue */
        border-color: #5aabf0;
        color: #0d4f8a; /* dark blue text for contrast */
    }

        .mcx-sv-btn.active:hover {
            background: #b8d8fa;
            border-color: #2e8de0;
        }

/* "Street View Unavailable" pill */
.mcx-pan-unavailable {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 7px 10px;
    margin-bottom: 8px;
    border-radius: 6px;
    background: #f5e6a3; /* same gold background */
    border: 1px solid #c9a84c;
    color: #7a6010; /* muted gold-brown for unavailable state */
    font-size: 11px;
    font-style: italic;
}

/* ── Unavailable notice ───────────────────────────────── */
.mcx-pan-unavailable {
    font-size: 12px;
    color: #888;
    font-style: italic;
    margin: 2px 0 12px 0;
    display: flex;
    align-items: center;
}

/* Flex layout for map + panorama split */
#mcxMapWrap { display: flex; width: 100%; height: 100%; position: relative; }
#mcxMapContainer { height: 100%; min-width: 0; }
#mcxPanContainer { height: 100%; min-width: 0; }
