/**
 * DSGVO-konformer Cookie Banner
 * Version 1.0 - Februar 2026
 */

/* Overlay/Backdrop */
#cookie-banner-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 9998;
    backdrop-filter: blur(3px);
}

#cookie-banner-backdrop.active {
    display: block;
}

/* Cookie Banner Container */
#cookie-banner {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-top: 3px solid #2c3e50;
    box-shadow: 0 -2px 20px rgba(0, 0, 0, 0.2);
    padding: 25px 20px;
    z-index: 9999;
    font-family: 'Jura', Arial, sans-serif;
    max-height: 90vh;
    overflow-y: auto;
}

#cookie-banner.active {
    display: block;
}

/* Responsive Container */
.cookie-banner-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Header */
.cookie-banner-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.cookie-banner-header h3 {
    margin: 0;
    font-size: 20px;
    color: #2c3e50;
    font-weight: 400;
}

.cookie-icon {
    font-size: 24px;
    margin-right: 10px;
}

/* Text */
.cookie-banner-text {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 20px;
}

.cookie-banner-text a {
    color: #3498db;
    text-decoration: none;
    font-weight: 400;
}

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

/* Button Container */
.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

/* Buttons */
.cookie-btn {
    padding: 12px 30px;
    font-size: 14px;
    font-family: 'Jura', Arial, sans-serif;
    font-weight: 400;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.cookie-btn-accept {
    background: #27ae60;
    color: white;
}

.cookie-btn-accept:hover {
    background: #229954;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(39, 174, 96, 0.3);
}

.cookie-btn-reject {
    background: #e74c3c;
    color: white;
}

.cookie-btn-reject:hover {
    background: #c0392b;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(231, 76, 60, 0.3);
}

.cookie-btn-settings {
    background: #95a5a6;
    color: white;
}

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

/* Cookie Settings Panel */
#cookie-settings {
    display: none;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

#cookie-settings.active {
    display: block;
}

.cookie-category {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 4px;
}

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

.cookie-category h4 {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    color: #2c3e50;
}

.cookie-category-description {
    font-size: 13px;
    color: #666;
    margin-bottom: 10px;
}

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

.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: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #27ae60;
}

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

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

/* Required Badge */
.cookie-required-badge {
    display: inline-block;
    background: #95a5a6;
    color: white;
    padding: 2px 8px;
    border-radius: 3px;
    font-size: 11px;
    margin-left: 10px;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #cookie-banner {
        padding: 20px 15px;
    }
    
    .cookie-banner-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
        text-align: center;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .cookie-toggle {
        margin-top: 10px;
    }
}

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

#cookie-banner.active {
    animation: slideUp 0.4s ease-out;
}
