/*
Theme Name: History Quest
Description: Interactive Historical Map Theme
Version: 2.0
Author: Your Name
*/

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

html, body, #historical-map {
    height: 100%;
    overflow: hidden;
    background: #1a3650; /* Deep blue sky */
    font-family: 'Times New Roman', serif;
}

#map-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.ui-layer {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
}

/* Performance stats */
#perf-stats {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 100;
    opacity: 0.7;
    pointer-events: none;
}

/* Side Panels */
.panel {
    position: absolute;
    top: 0;
    height: 100%;
    background: #f7f0d5; /* Parchment color */
    border-right: 2px solid #8b7355; /* Aged paper border */
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
    pointer-events: all;
    transition: transform 0.3s ease;
}

.left-panel {
    left: 0;
    width: 300px;
    transform: translateX(-100%);
}

.right-panel {
    right: 0;
    width: 400px;
    transform: translateX(100%);
}

.panel.open {
    transform: translateX(0);
}

.panel-header {
    background: #8b7355;
    color: #f7f0d5;
    padding: 15px;
    display: flex;
    justify-content: between;
    align-items: center;
    border-bottom: 1px solid #6b5a45;
}

.panel-header h2 {
    margin: 0;
    font-size: 1.2em;
    flex-grow: 1;
}

.close-panel {
    background: none;
    border: none;
    color: #f7f0d5;
    font-size: 1.5em;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.panel-content {
    padding: 20px;
    height: calc(100% - 60px);
    overflow-y: auto;
}

/* UI Controls */
.ui-controls {
    position: absolute;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    pointer-events: all;
}

.control-btn {
    background: rgba(139, 115, 85, 0.9);
    color: #f7f0d5;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-family: inherit;
    font-size: 14px;
    transition: background 0.3s ease;
}

.control-btn:hover {
    background: rgba(139, 115, 85, 1);
}

/* Marker content styles */
.marker-content {
    padding: 20px;
}

.marker-content img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 15px;
}

.marker-details h3 {
    color: #5d4037;
    margin-bottom: 10px;
    font-size: 1.3em;
}

.meta {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #6b5a45;
}

.read-more {
    background: #8b7355;
    color: #f7f0d5;
    border: none;
    padding: 10px 20px;
    border-radius: 3px;
    cursor: pointer;
    margin-top: 15px;
    width: 100%;
}

/* Filters */
.filters-content {
    padding: 20px;
}

.filters-content h3 {
    color: #5d4037;
    margin-bottom: 10px;
    font-size: 1.1em;
}

.filters-content ul {
    list-style: none;
    margin-bottom: 20px;
}

.filters-content li {
    margin-bottom: 8px;
}

.filters-content label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.filters-content input[type="checkbox"] {
    margin-right: 10px;
}

.timeline-slider {
    margin-top: 20px;
}

.timeline-slider input[type="range"] {
    width: 100%;
    margin-top: 10px;
}

/* Device-specific adaptations */
@media (max-width: 768px), (hover: none) {
    .left-panel {
        width: 90vw;
    }
    
    .right-panel {
        width: 95vw;
    }
    
    .ui-controls {
        top: 10px;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .control-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* Print styles */
@media print {
    body::before {
        content: "Interactive map disabled for printing";
        position: fixed;
        top: 0;
        left: 0;
        background: red;
        color: white;
        padding: 1rem;
        z-index: 10000;
    }
}