/* Interactive Map Layout */

body {
    overflow: hidden; /* Prevent scrolling on the body so map uses full height */
    display: flex;
    flex-direction: column;
    height: 100vh;
}

.map-container {
    display: flex;
    flex: 1;
    overflow: hidden;
}

.map-sidebar {
    width: 400px;
    background: var(--bg-navy);
    border-right: 1px solid rgba(201, 162, 39, 0.2);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10;
}

.map-header {
    padding: 2rem 1.5rem;
    border-bottom: 1px solid rgba(201, 162, 39, 0.15);
    background: var(--bg-dark);
}

.map-header h1 {
    font-size: 1.5rem;
    color: var(--gold);
    margin: 0 0 0.5rem;
    font-family: 'Noto Serif JP', serif;
}

.map-header p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0 0 1rem;
    line-height: 1.5;
}

.map-disclaimer {
    font-size: 0.8rem !important;
    opacity: 0.85;
    font-style: italic;
    margin-top: 0.5rem !important;
}

.map-filter input {
    width: 100%;
    padding: 0.8rem 1rem;
    font-size: 1rem;
    background: var(--bg-navy);
    border: 1px solid rgba(201, 162, 39, 0.3);
    border-radius: var(--radius-block);
    color: var(--text);
    font-family: 'Crimson Pro', serif;
}

.map-filter input:focus {
    outline: none;
    border-color: var(--gold);
}

.map-list {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
}

.map-card {
    background: rgba(201, 162, 39, 0.03);
    border: 1px solid rgba(201, 162, 39, 0.15);
    border-radius: var(--radius-block);
    padding: 1.25rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.map-card:hover {
    background: rgba(201, 162, 39, 0.08);
    border-color: var(--gold);
}

.map-card.active {
    background: rgba(201, 162, 39, 0.12);
    border-color: var(--gold);
}

.map-card-tag {
    font-size: 0.75rem;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.map-card h3 {
    font-size: 1.2rem;
    color: var(--text);
    margin: 0 0 0.25rem;
    font-family: 'Noto Serif JP', serif;
}

.map-card-loc {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.map-card p {
    font-size: 0.95rem;
    margin: 0;
    line-height: 1.5;
    color: var(--text);
}

.map-view {
    flex: 1;
    background: #000;
}

/* Custom Marker */
.shogun-marker {
    background: var(--gold);
    border: 2px solid var(--bg-dark);
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(201, 162, 39, 0.5);
    transition: transform 0.2s;
}

.shogun-marker:hover {
    transform: scale(1.2);
}

/* Leaflet Dark Theme Overrides */
.leaflet-popup-content-wrapper {
    background: var(--bg-navy);
    color: var(--text);
    border: 1px solid var(--gold);
    border-radius: var(--radius-block);
    font-family: 'Crimson Pro', serif;
}

.leaflet-popup-tip {
    background: var(--bg-navy);
    border-top: 1px solid var(--gold);
    border-left: 1px solid var(--gold);
}

.leaflet-popup-content h3 {
    font-family: 'Noto Serif JP', serif;
    color: var(--gold);
    margin: 0 0 0.5rem;
    font-size: 1.2rem;
}

.leaflet-popup-content p {
    margin: 0;
    font-size: 0.95rem;
}

.leaflet-container a.leaflet-popup-close-button {
    color: var(--gold);
}

/* Layer control (Dark / Satellite toggle) */
.leaflet-control-layers {
    background: var(--bg-navy) !important;
    border: 1px solid rgba(201, 162, 39, 0.3) !important;
    border-radius: var(--radius-block);
}
.leaflet-control-layers-expanded {
    padding: 0.5rem 0.75rem;
}
.leaflet-control-layers label {
    color: var(--text);
    font-family: 'Crimson Pro', serif;
}
.leaflet-control-layers-selector:checked + span {
    color: var(--gold);
}

/* Responsive */
@media (max-width: 768px) {
    .map-container {
        flex-direction: column-reverse;
    }
    
    .map-sidebar {
        width: 100%;
        height: 50%;
        border-right: none;
        border-top: 1px solid rgba(201, 162, 39, 0.2);
    }
    
    .map-view {
        height: 50%;
    }
}