/**
 * Cookie Consent Banner - DSGVO/GDPR konform für Deutschland
 * 
 * Features:
 * - Opt-in (keine Cookies vor Zustimmung)
 * - Granulare Auswahl (Notwendig, Funktional, Statistik, Marketing)
 * - Speichert Einwilligung für 365 Tage
 * - Einfache Integration
 */

.cookie-consent-wrapper {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.cookie-consent-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 999998;
    display: none;
}

.cookie-consent-overlay.active {
    display: block;
}

.cookie-consent-banner {
    background: linear-gradient(135deg, #0a3d2c 0%, #164d3a 100%);
    border-top: 3px solid #7fda89;
    box-shadow: 0 -5px 40px rgba(0, 0, 0, 0.3);
    padding: 25px;
    color: #fff;
    max-width: 100%;
}

.cookie-consent-container {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-consent-content {
    display: flex;
    gap: 30px;
    align-items: flex-start;
    flex-wrap: wrap;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.4rem;
    color: #7fda89;
}

.cookie-consent-text p {
    margin: 0 0 15px 0;
    line-height: 1.6;
    opacity: 0.95;
    font-size: 0.95rem;
}

.cookie-consent-text a {
    color: #7fda89;
    text-decoration: underline;
}

.cookie-consent-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-consent-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.cookie-consent-btn-accept-all {
    background: #7fda89;
    color: #0a3d2c;
}

.cookie-consent-btn-accept-all:hover {
    background: #6bc978;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(127, 218, 137, 0.4);
}

.cookie-consent-btn-necessary {
    background: transparent;
    color: #fff;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-consent-btn-necessary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cookie-consent-btn-settings {
    background: transparent;
    color: #7fda89;
    border: 2px solid #7fda89;
}

.cookie-consent-btn-settings:hover {
    background: rgba(127, 218, 137, 0.1);
}

/* Settings Modal */
.cookie-consent-settings {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: linear-gradient(135deg, #0a3d2c 0%, #164d3a 100%);
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 10px 60px rgba(0, 0, 0, 0.5);
    z-index: 1000000;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s;
    border: 2px solid #7fda89;
}

.cookie-consent-settings.active {
    opacity: 1;
    pointer-events: all;
    transform: translate(-50%, -50%) scale(1);
}

.cookie-consent-settings h3 {
    margin: 0 0 20px 0;
    color: #7fda89;
    font-size: 1.5rem;
}

.cookie-consent-settings p {
    margin: 0 0 20px 0;
    line-height: 1.6;
    opacity: 0.9;
}

.cookie-category {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.cookie-category-title {
    font-weight: 600;
    font-size: 1.1rem;
    color: #7fda89;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-category-description {
    font-size: 0.9rem;
    opacity: 0.8;
    line-height: 1.5;
    margin-top: 10px;
}

.cookie-category-required {
    font-size: 0.75rem;
    padding: 4px 12px;
    background: rgba(127, 218, 137, 0.2);
    border-radius: 12px;
    color: #7fda89;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

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

.cookie-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.2);
    transition: 0.3s;
    border-radius: 34px;
}

.cookie-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #7fda89;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    cursor: not-allowed;
    opacity: 0.5;
}

.cookie-settings-buttons {
    display: flex;
    gap: 10px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.cookie-settings-buttons button {
    flex: 1;
    min-width: 140px;
}

/* Responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
    }
    
    .cookie-consent-buttons {
        width: 100%;
    }
    
    .cookie-consent-btn {
        flex: 1;
        text-align: center;
    }
    
    .cookie-consent-settings {
        width: 95%;
        padding: 20px;
    }
    
    .cookie-settings-buttons {
        flex-direction: column;
    }
    
    .cookie-settings-buttons button {
        width: 100%;
    }
}

/* Animation für das Banner */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-banner.show {
    animation: slideUp 0.4s ease-out;
}

/* Close Button für Settings */
.cookie-settings-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.cookie-settings-close:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: rotate(90deg);
}
