/* ============================================
   COOKIE BANNER & EINSTELLUNGEN - KOMPLETT
   ============================================ */

:root {
    --sp: 0.3s;
    --ac: #4f8ef7;
    --text: #1a1a1a;
    --muted: #666;
    --border: #e0e0e0;
    --header-offset: 80px; /* Standard Abstand zur Navigation */
}

*, *:before, *:after {
    box-sizing: border-box;
    transition: all var(--sp) ease;
}

/* ============ COOKIE BANNER ============ */
#cookies-eu-banner {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 20px;
}

.cookies-eu-modal {
    background: #ffffff;
    color: var(--text);
    max-width: 440px;
    width: 100%;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 20px 40px -20px rgba(0,0,0,0.2);
    border-top: 4px solid var(--ac);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.cookies-eu-modal h2 {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
}

.cookies-eu-notice {
    background: #f8f9fa;
    border-left: 3px solid var(--ac);
    padding: 10px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--muted);
    margin-bottom: 12px;
}

.cookies-eu-text {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

.cookies-eu-categories {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

/* ============ GEMEINSAME CHECKBOXEN ============ */
.cookies-eu-category {
    position: relative;
    display: flex;
    align-items: center;
    padding: 12px;
    background: #fafafa;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    margin-bottom: 0;
}

.cookies-eu-category:hover {
    border-color: #ccc;
    background: #f5f5f5;
}

.cookies-eu-category:has(input:checked) {
    border-color: var(--ac);
    background: #f0f6ff;
}

.cookies-eu-category:has(input:disabled) {
    background: #f8f8f8;
    border-color: #e5e5e5;
    cursor: not-allowed;
}

.cookies-eu-category:before {
    content: "";
    width: 20px;
    height: 20px;
    border: 2px solid #ccc;
    border-radius: 4px;
    margin-right: 12px;
    flex-shrink: 0;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: bold;
    color: white;
}

.cookies-eu-category:has(input:checked):before {
    background: var(--ac);
    border-color: var(--ac);
    content: "✓";
}

.cookies-eu-category:has(input:disabled):before {
    background: #e8e8e8;
    border-color: #d0d0d0;
    content: "✓";
    color: #999;
}

.cookies-eu-category span {
    font-size: 13px;
    color: var(--text);
    flex: 1;
}

.cookies-eu-category span strong {
    font-weight: 600;
}

.cookies-eu-category span:last-of-type {
    font-size: 11px;
    color: var(--muted);
    display: block;
    margin-top: 2px;
}

.cookies-eu-category input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* ============ BUTTONS ============ */
.cookies-eu-actions {
    display: flex;
    gap: 8px;
    margin-top: 16px;
}

#cookies-eu-accept,
#settings-save {
    flex: 1;
    padding: 10px;
    background: var(--ac);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#cookies-eu-accept:hover,
#settings-save:hover {
    background: #3d7be0;
}

#cookies-eu-save {
    flex: 1;
    padding: 10px;
    background: white;
    color: var(--ac);
    border: 1px solid var(--ac);
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

#cookies-eu-save:hover {
    background: #f0f6ff;
}

#cookies-eu-reject {
    padding: 10px;
    background: transparent;
    color: var(--muted);
    border: none;
    border-radius: 6px;
    font-size: 13px;
    cursor: pointer;
}

#cookies-eu-reject:hover {
    color: var(--text);
    background: #f5f5f5;
}

/* ============ FOOTER & LINKS ============ */
.cookies-eu-footer {
    text-align: center;
    font-size: 11px;
    color: var(--muted);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--border);
}

.cookies-eu-footer a,
.cookie-settings-container a {
    color: var(--ac);
    text-decoration: none;
}

.cookies-eu-footer a:hover,
.cookie-settings-container a:hover {
    text-decoration: underline;
}

.cookies-eu-footer .sep {
    margin: 0 6px;
    color: #ccc;
}

/* ============ EINSTELLUNGEN SEITE ============ */
.cookie-settings-container {
    background: #ffffff;
    color: var(--text);
    max-width: 440px;
    width: 90%;
    margin: 180px auto 40px;
    border-radius: 12px;
    padding: 20px 24px;
    box-shadow: 0 20px 40px -20px rgba(0,0,0,0.2);
    border-top: 4px solid var(--ac);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.4;
    height: auto !important;  /* Erzwingt automatische Höhe */
    min-height: 0 !important;  /* Entfernt Mindesthöhe */
    text-align: left;  /* Text linksbündig */
}
main.cookie-settings-container {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
}

.cookie-settings-container h1 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 600;
}

.cookie-settings-container p {
    color: var(--muted);
    font-size: 13px;
    margin-bottom: 10px;
    line-height: 1.4;
}

/* Letztes Element ohne Margin */
.cookie-settings-container p:last-child {
    margin-bottom: 0;
}

/* Erfolgsmeldung */
.success-message {
    background: #e8f5e9;
    border: 1px solid #4caf50;
    color: #2e7d32;
    border-radius: 4px;
    padding: 8px;
    font-weight: 500;
    margin: 10px 0 0;
}

/* Abstand Link */
.cookie-settings-container .abstand {
    margin: 12px 0 0;
    padding-top: 10px;
    border-top: 1px solid var(--border);
    font-size: 12px;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .cookie-settings-container {
        margin: 140px auto 30px;
        padding: 16px 20px;
        width: 92%;
    }
}

@media (max-width: 600px) {
    .cookies-eu-modal {
        padding: 16px;
        margin: 10px;
    }
    
    .cookie-settings-container {
        margin: 120px auto 20px;
        padding: 14px 16px;
        width: 95%;
    }
    
    .cookies-eu-actions {
        flex-direction: column;
        gap: 6px;
    }
    
    #cookies-eu-accept,
    #cookies-eu-save,
    #settings-save {
        width: 100%;
    }
}

@media (max-width: 400px) {
    .cookie-settings-container {
        margin: 100px auto 15px;
        padding: 12px;
    }
}