/* cookie.css - ParkSpotter Theme */

:root {
    --cb-bg: #ffffff;
    --cb-text: #0f172a; /* slate-900 */
    --cb-text-muted: #64748b; /* slate-500 */
    --cb-primary: #0f172a; /* slate-900 */
    --cb-accent: #3b82f6; /* blue-500 */
    --cb-success: #10b981; /* emerald-500 */
    --cb-border: #e2e8f0; /* slate-200 */
    --cb-radius: 24px;
    --cb-z-index: 20000; /* Muss über Leaflet und React Modals liegen */
}

/* Backdrop */
.cb-backdrop {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: var(--cb-z-index);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cb-backdrop.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Modal / Top Sheet - Enterprise Fix */
.cb-modal {
    position: fixed;
    top: 0; /* Fixiert am oberen Rand */
    bottom: auto; /* Nicht mehr unten */
    left: 0;
    width: 100%;
    max-width: 480px;
    background: var(--cb-bg);
    
    /* Radius nur unten, damit es oben bündig abschließt */
    border-radius: 0 0 var(--cb-radius) var(--cb-radius);
    
    /* Schatten nach unten werfen */
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    
    padding: 24px;
    /* Safe Area für iPhone Notch beachten */
    padding-top: max(24px, env(safe-area-inset-top)); 
    
    /* Animation kommt von oben (-100%) */
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: var(--cb-z-index) + 1;
    font-family: 'Inter', sans-serif;
    margin: 0 auto;
    right: 0;
}

.cb-backdrop.is-visible .cb-modal {
    transform: translateY(0);
}

/* Header */
.cb-header {
    margin-bottom: 16px;
}

.cb-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--cb-text);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cb-text {
    font-size: 14px;
    line-height: 1.5;
    color: var(--cb-text-muted);
}

/* Toggles List */
.cb-options {
    margin: 20px 0;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cb-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc; /* slate-50 */
    border: 1px solid var(--cb-border);
    border-radius: 12px;
}

.cb-label-group {
    display: flex;
    flex-direction: column;
}

.cb-label-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--cb-text);
}

.cb-label-desc {
    font-size: 11px;
    color: var(--cb-text-muted);
}

/* iOS Style Switch */
.cb-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.cb-switch input { 
    opacity: 0; 
    width: 0; 
    height: 0; 
}

.cb-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: .3s;
    border-radius: 24px;
}

.cb-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .cb-slider {
    background-color: var(--cb-success);
}

input:disabled + .cb-slider {
    background-color: #94a3b8;
    opacity: 0.5;
    cursor: not-allowed;
}

input:checked + .cb-slider:before {
    transform: translateX(20px);
}

/* Buttons */
.cb-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cb-btn {
    width: 100%;
    padding: 14px;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    text-align: center;
}

.cb-btn-primary {
    background-color: var(--cb-primary);
    color: white;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.15);
}

.cb-btn-primary:active {
    transform: scale(0.98);
    background-color: #1e293b;
}

.cb-btn-secondary {
    background-color: transparent;
    color: var(--cb-text-muted);
    border: 1px solid var(--cb-border);
}

.cb-btn-secondary:hover {
    background-color: #f1f5f9;
    color: var(--cb-text);
}

/* Links */
.cb-links {
    margin-top: 16px;
    display: flex;
    justify-content: center;
    gap: 16px;
}

.cb-link {
    font-size: 11px;
    color: var(--cb-text-muted);
    text-decoration: none;
}

.cb-link:hover {
    text-decoration: underline;
}

/* Expansion Animation (Details) */
.cb-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.cb-details.is-open {
    max-height: 300px; /* Genug Platz für die Optionen */
}

/* Enterprise "Corner Arc" Trigger 
   Ein dezenter Viertel-Kreis in der oberen rechten Ecke.
   Sieht aus wie ein Teil der App-Struktur, nicht wie ein Overlay.
/* ... (ca. Zeile 210) */
.cb-trigger {
    position: fixed;
    top: 0;
    right: 0;
    bottom: auto;
    left: auto;

    /* Größe des Bogens - VERKLEINERT */
    width: 36px;
    height: 36px;
    
    /* Der Trick für den Bogen: Radius angepasst */
    border-radius: 0 0 0 24px; 
    
    /* Design: Glassmorphismus Weiss */
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    
    /* Feiner Border nur an der Kurve */
    border-left: 1px solid rgba(226, 232, 240, 0.8);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: -2px 2px 10px rgba(0, 0, 0, 0.05);
    
    /* Inhalt (Icon) zentrieren */
    display: flex;
    align-items: center;
    justify-content: center;
    padding-left: 4px; /* Padding proportional verringert */
    padding-bottom: 4px;
    
    cursor: pointer;
    z-index: 20000; /* Ganz oben */
    color: var(--cb-text-muted);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Hover Effekt: Bogen wird etwas größer */
.cb-trigger:hover {
    width: 44px;
    height: 44px;
    color: var(--cb-accent);
    box-shadow: -4px 4px 15px rgba(59, 130, 246, 0.15);
}

/* Icon Styling im Bogen */
.cb-trigger svg {
    width: 16px; /* Icon leicht verkleinert */
    height: 16px;
    /* Verhindert Verzerrung beim Animieren */
    min-width: 16px; 
}

/* Text im Bogen verstecken - Enterprise Apps nutzen hier nur Icons für Clean Look */
.cb-trigger:not(:hover):after {
    display: none;
}
/* Optional: Tooltip-Text nur bei Hover anzeigen (außerhalb des Bogens) */
.cb-trigger:hover:before {
    content: "Datenschutz";
    position: absolute;
    right: 55px; /* Links neben dem Bogen */
    top: 15px;
    background: #1e293b;
    color: white;
    font-size: 11px;
    padding: 4px 8px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    animation: fadeInTooltip 0.2s forwards;
    pointer-events: none;
}

@keyframes fadeInTooltip {
    to { opacity: 1; transform: translateX(-5px); }
}

/* Safe Area Support (z.B. iPhone Notch Landscape) */
@supports (padding-top: env(safe-area-inset-top)) {
    .cb-trigger {
        top: env(safe-area-inset-top);
        right: env(safe-area-inset-right);
    }
}