:root {
    --primary-color: #6200ee;
    --bg-color: #f4f7f6;
    --text-main: #2d3436;
    --text-muted: #636e72;
}

body { 
    background-color: var(--bg-color); 
    font-family: 'Inter', -apple-system, sans-serif; 
    color: var(--text-main);
    font-size: 12px;
    line-height: 1.2;
}

/* Sidebar - Slimmer and more compact */
.slider-card { 
    background: white; 
    padding: 10px; 
    border-radius: 6px; 
    box-shadow: 0 1px 2px rgba(0,0,0,0.1); 
    position: sticky; 
    top: 5px;
    max-height: 98vh;
    overflow-y: auto;
}

.form-label {
    font-weight: 700;
    font-size: 9px;
    text-transform: uppercase;
    margin-bottom: -2px;
    color: var(--text-muted);
}

/* Activity / format chips — symmetric spacers so chips stay even width */
.activity-chip::before { content: '+ '; color: transparent; }
.activity-chip::after  { content: ' +'; color: transparent; }
.activity-chip.chip-and::before { content: '+ '; color: inherit; }
.activity-chip.chip-not::before { content: '− '; color: inherit; }

.imp-badge {
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    cursor: pointer;
    user-select: none;
    letter-spacing: 0.5px;
    line-height: 1.4;
}
.imp-1 { background: #eee; color: #888; }
.imp-2 { background: #e3f2fd; color: #1565c0; }
.imp-3 { background: #fff3e0; color: #e65100; }
.imp-off { background: #fce4ec; color: #c62828; text-decoration: line-through; }

.form-range { height: 1.2rem; }
.form-select-sm { font-size: 11px; padding: 2px 4px; }

/* List View - Maximum density */
.date-row {
    background: white;
    margin-bottom: 2px;
    padding: 6px 12px;
    border-radius: 4px;
    display: flex;
    align-items: flex-start;
    transition: all 0.1s ease;
    border-bottom: 1px solid #eee;
    gap: 12px;
}

.date-row:hover {
    background: #f8f9fa;
    transform: translateX(2px);
}

.score-circle {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 11px;
    flex-shrink: 0;
    margin-top: 2px;
}

.score-high { background: #6200ee; color: white; }
.score-mid { background: #eee; color: #666; }

.date-info { flex-grow: 1; min-width: 0; }
.date-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1px; gap: 10px; }
.date-title { font-weight: 700; font-size: 13px; margin: 0; color: #000; flex-grow: 1; line-height: 1.1; }
.date-subtitle { font-size: 11px; font-weight: 600; color: var(--primary-color); line-height: 1; opacity: 0.9; }

.date-side-meta { text-align: right; flex-shrink: 0; min-width: 55px; }
.date-meta { font-size: 9px; color: var(--text-muted); white-space: nowrap; line-height: 1.2; }
.cost-val { font-weight: 800; color: #2ecc71; font-size: 11px; letter-spacing: 1px; line-height: 1; }
.cost-free { color: #3498db; font-size: 9px; }

.date-desc { font-size: 10.5px; color: #555; margin: 1px 0 3px 0; line-height: 1.25; }

.vibe-summary {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #999;
    text-transform: uppercase;
}

.vibe-tag { color: var(--primary-color); opacity: 0.8; white-space: nowrap; }

.timing-tag {
    font-size: 8px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    text-transform: uppercase;
    white-space: nowrap;
}
.timing-always { background: #e8f5e9; color: #2e7d32; }
.timing-seasonal { background: #fff3e0; color: #ef6c00; }
.timing-recurring { background: #e3f2fd; color: #1565c0; }
.timing-event { background: #fce4ec; color: #c2185b; }


.source-tag {
    font-size: 9px;
    padding: 2px 6px;
    border-radius: 4px;
    background: #f0f0f0;
    color: var(--text-muted);
    margin-top: 4px;
    cursor: default;
}

.btn-link-sm {
    font-size: 10px;
    text-decoration: none;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid #eee;
    color: var(--text-muted);
    display: inline-block;
    margin-top: 4px;
    transition: all 0.2s;
}

.btn-link-sm:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.info-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 12px;
    height: 12px;
    background: #ddd;
    color: #fff;
    border-radius: 50%;
    font-size: 8px;
    font-weight: 800;
    cursor: help;
    transition: background 0.2s;
}

.info-icon:hover {
    background: var(--primary-color);
}

hr { margin: 8px 0; }
.mb-2 { margin-bottom: 0.4rem !important; }
.mb-3 { margin-bottom: 0.6rem !important; }

#results { display: block !important; }

#map {
    display: none;
    height: 320px;
    border-radius: 6px;
    overflow: hidden;
    position: relative;
}
#map.visible { display: block; }

#map-resize-handle {
    display: none;
    height: 8px;
    margin-bottom: 6px;
    background: #eee;
    border-radius: 0 0 6px 6px;
    cursor: ns-resize;
    position: relative;
}
#map-resize-handle.visible { display: block; }
#map-resize-handle::after {
    content: '';
    display: block;
    width: 32px;
    height: 3px;
    background: #ccc;
    border-radius: 2px;
    margin: 2px auto 0;
}

.map-popup .maplibregl-popup-content {
    padding: 6px 10px;
    font-size: 11px;
    font-family: 'Inter', -apple-system, sans-serif;
    width: 320px;
}

/* Activity type chips (filter bar) */
.activity-chip {
    font-size: 9px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    border: 1px solid #ddd;
    background: #f5f5f5;
    color: #888;
    cursor: pointer;
    text-transform: uppercase;
    transition: all 0.15s;
    user-select: none;
    white-space: nowrap;
}
.activity-chip:hover { border-color: var(--primary-color); color: var(--primary-color); }
.activity-chip.active { background: #e0e0e0; color: #555; border-color: #ccc; } /* reset/all chip */
.chip-reset { font-style: italic; }
.chip-or  { background: var(--primary-color); color: white; border-color: var(--primary-color); }
.chip-and { background: #0288d1; color: white; border-color: #0277bd; }
.chip-not { background: #c62828; color: white; border-color: #b71c1c; text-decoration: line-through; }

/* Activity type tags on result cards */
.activity-type-tag {
    font-size: 8px;
    font-weight: 700;
    padding: 1px 5px;
    border-radius: 3px;
    background: #ede7f6;
    color: var(--primary-color);
    text-transform: uppercase;
    white-space: nowrap;
}

/* Validity flag badges */
.validity-badge {
    font-size: 7px;
    font-weight: 800;
    padding: 1px 4px;
    border-radius: 3px;
    background: #fff3e0;
    color: #e65100;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    vertical-align: middle;
    margin-left: 4px;
}
.validity-note {
    font-size: 9px;
    color: #e65100;
    font-style: italic;
    margin-bottom: 3px;
    opacity: 0.8;
}

.map-style-toggle {
    position: absolute;
    bottom: 30px;
    left: 10px;
    z-index: 10;
    background: white;
    border: 2px solid rgba(0,0,0,0.2);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0,0,0,0.4);
}

.map-style-toggle:hover {
    background: #f4f4f4;
}
