:root {
    --primary-color: #0056b3;
    --bg-color: #f8f9fa;
    --text-color: #212529;
    --modal-bg: rgba(0, 0, 0, 0.6);
}

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

body {
    font-family: system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-color);
    display: flex;
    flex-direction: column;
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
}

header {
    background-color: var(--primary-color);
    color: white;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
}

.header-title { font-size: 1.2rem; font-weight: bold; text-align: center; flex-grow: 1; }
.header-btn {
    background-color: #ab093d; color: white; text-decoration: none;
    padding: 6px 12px; border-radius: 5px; font-size: 0.9rem; font-weight: bold;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2); transition: background-color 0.2s; white-space: nowrap;
}
.header-btn:hover { background-color: #8a0731; }

#map { flex-grow: 1; width: 100%; z-index: 1; }

.controls-bar {
    padding: 15px; padding-bottom: calc(15px + env(safe-area-inset-bottom, 0px)); 
    background: white; box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    display: flex; gap: 10px; z-index: 1000;
}

button {
    min-height: 48px; min-width: 48px; padding: 10px 15px;
    font-size: 1rem; font-weight: bold; border: none; border-radius: 8px;
    cursor: pointer; flex: 1; transition: background-color 0.2s;
}
button:focus-visible { outline: 3px solid #ffbf47; outline-offset: 2px; }
.btn-primary { background-color: var(--primary-color); color: white; }
.btn-primary:hover { background-color: #004494; }
.btn-secondary { background-color: #e2e6ea; color: #333; }
.btn-danger { background-color: #dc3545; color: white; margin-top: 10px; width: 100%; }

.modal-overlay {
    display: none; position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.1); pointer-events: none; z-index: 2000;
    justify-content: center; align-items: flex-end; 
    padding: 15px; padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}

.modal-content {
    background: white; padding: 15px; border-radius: 12px; width: 100%;
    max-width: 300px; max-height: 65vh; overflow-y: auto; 
    box-shadow: 0 10px 30px rgba(0,0,0,0.3); pointer-events: auto; position: relative; 
}

#settingsModal .modal-content { max-width: 400px; }

.drag-handle {
    text-align: center; padding: 8px; margin: -15px -15px 10px -15px;
    background-color: #f1f1f1; border-top-left-radius: 12px; border-top-right-radius: 12px;
    cursor: grab; font-size: 1.2rem; line-height: 1; color: #888;
    border-bottom: 1px solid #ddd; touch-action: none;
}
.drag-handle:active { cursor: grabbing; }

.modal-content h2 { margin-bottom: 5px; font-size: 1.2rem; }
.poi-category { font-size: 0.8rem; color: #666; margin-bottom: 10px; text-transform: uppercase; font-weight: bold; }

/* --- KOMPAKTE INDSTILLINGER --- */
.setting-group { margin-bottom: 12px; }
.setting-group label { display: block; margin-bottom: 4px; font-weight: bold; font-size: 0.9rem; }
.filter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; } /* To kolonner */

.poi-image { width: 100%; height: auto; border-radius: 8px; margin-bottom: 10px; max-height: 150px; object-fit: cover; }
.poi-desc { margin-bottom: 15px; line-height: 1.4; font-size: 0.95rem; }
.poi-link { display: inline-block; margin-bottom: 15px; color: var(--primary-color); font-weight: bold; text-decoration: none; font-size: 0.95rem; }
.poi-link:hover { text-decoration: underline; }

.checkbox-label { display: flex; align-items: center; margin-bottom: 4px; font-weight: normal; font-size: 0.85rem; }
.checkbox-label input { width: 16px; height: 16px; margin-right: 6px; }
input[type="range"] { width: 100%; height: 36px; }