/**
 * Cookie Consent Banner Styles
 * DSGVO/TKG 2021 konform - keine Dark Patterns
 * Beide Buttons (Akzeptieren/Ablehnen) gleichwertig gestaltet
 */

/* Overlay */
#cookie-consent-banner {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#cookie-consent-banner.cookie-visible {
    opacity: 1;
    visibility: visible;
}

#cookie-consent-banner.cookie-hidden {
    opacity: 0;
    visibility: hidden;
}

.cookie-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(2px);
}

/* Modal */
.cookie-modal {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-radius: 16px 16px 0 0;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    max-height: 90vh;
    overflow-y: auto;
    transform: translateY(100%);
    animation: slideUp 0.3s ease forwards;
}

@keyframes slideUp {
    to {
        transform: translateY(0);
    }
}

/* Desktop: zentriertes Modal */
@media (min-width: 768px) {
    .cookie-modal {
        position: absolute;
        bottom: 50%;
        left: 50%;
        transform: translate(-50%, 50%);
        max-width: 600px;
        width: 90%;
        border-radius: 16px;
        animation: fadeIn 0.3s ease forwards;
    }
    
    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translate(-50%, 50%) scale(0.95);
        }
        to {
            opacity: 1;
            transform: translate(-50%, 50%) scale(1);
        }
    }
}

.cookie-content {
    padding: 24px;
}

/* Header */
.cookie-header {
    margin-bottom: 16px;
}

.cookie-header h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a1a1a;
    margin: 0;
}

/* Body */
.cookie-body {
    margin-bottom: 20px;
}

.cookie-body p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #444;
    margin: 0 0 12px 0;
}

.cookie-legal {
    font-size: 0.85rem !important;
    color: #666 !important;
    font-style: italic;
}

/* Cookie-Optionen */
.cookie-options {
    margin-top: 20px;
    border-top: 1px solid #e5e5e5;
    padding-top: 20px;
}

.cookie-category {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
}

.cookie-category:last-child {
    margin-bottom: 0;
}

.cookie-category-header {
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-category-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.cookie-category-info strong {
    font-size: 1rem;
    color: #1a1a1a;
}

.cookie-badge {
    background: #0D9488;
    color: white;
    font-size: 0.7rem;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
}

.cookie-category-desc {
    font-size: 0.85rem !important;
    color: #666 !important;
    margin: 8px 0 0 0 !important;
    padding-left: 52px;
}

/* Toggle Switch */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

.cookie-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.cookie-switch input:checked + .cookie-slider {
    background-color: #0D9488;
}

.cookie-switch input:checked + .cookie-slider:before {
    transform: translateX(20px);
}

.cookie-slider.disabled {
    background-color: #0D9488;
    cursor: not-allowed;
    opacity: 0.7;
}

/* Footer */
.cookie-footer {
    border-top: 1px solid #e5e5e5;
    padding-top: 20px;
}

/* Buttons - WICHTIG: Gleichwertige Gestaltung für DSGVO-Konformität! */
.cookie-buttons-main {
    display: flex;
    gap: 12px;
    margin-bottom: 12px;
}

.cookie-btn {
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

/* DSGVO-konform: Beide Hauptbuttons GLEICHWERTIG gestaltet! */
.cookie-btn-accept {
    flex: 1;
    background: #0D9488;
    color: white;
    border-color: #0D9488;
}

.cookie-btn-accept:hover {
    background: #0f766e;
    border-color: #0f766e;
}

/* Ablehnen-Button GLEICHWERTIG zum Akzeptieren-Button */
.cookie-btn-reject {
    flex: 1;
    background: white;
    color: #0D9488;
    border-color: #0D9488;
}

.cookie-btn-reject:hover {
    background: #f0fdfa;
}

/* Sekundäre Buttons */
.cookie-buttons-secondary {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.cookie-btn-settings {
    flex: 1;
    background: #f3f4f6;
    color: #374151;
    border-color: #e5e7eb;
}

.cookie-btn-settings:hover {
    background: #e5e7eb;
}

.cookie-btn-save {
    flex: 1;
    background: #0D9488;
    color: white;
    border-color: #0D9488;
}

.cookie-btn-save:hover {
    background: #0f766e;
}

/* Links */
.cookie-links {
    text-align: center;
    font-size: 0.85rem;
}

.cookie-links a {
    color: #0D9488;
    text-decoration: none;
}

.cookie-links a:hover {
    text-decoration: underline;
}

.cookie-links span {
    color: #ccc;
    margin: 0 8px;
}

/* Footer Cookie-Einstellungen Link */
.cookie-settings-link {
    cursor: pointer;
    color: #0D9488;
}

.cookie-settings-link:hover {
    text-decoration: underline;
}

/* Responsive */
@media (max-width: 480px) {
    .cookie-content {
        padding: 20px 16px;
    }
    
    .cookie-header h2 {
        font-size: 1.25rem;
    }
    
    .cookie-buttons-main {
        flex-direction: column;
    }
    
    .cookie-buttons-secondary {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        padding: 14px 20px;
    }
    
    .cookie-category-desc {
        padding-left: 0;
        margin-top: 12px !important;
    }
}

/* Print: Banner ausblenden */
@media print {
    #cookie-consent-banner {
        display: none !important;
    }
}
