/* ========================================
   FES ESSLINGEN - COOKIE BANNER STYLES
   ======================================== */

:root {
    --fes-primary: #577fb6;
    --fes-primary-dark: #4a6b9e;
    --fes-primary-light: #6b91c9;
}

/* Cookie Banner Container */
#cookieBanner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    max-height: 90vh;
    overflow-y: auto;
}

#cookieBanner.show {
    transform: translateY(0);
}

.cookie-banner-content {
    padding: 2rem 0;
}

/* Cookie Header */
.cookie-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}

.cookie-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--fes-primary), var(--fes-primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: white;
    flex-shrink: 0;
}

.cookie-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
}

/* Cookie Text */
.cookie-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.cookie-text a {
    color: var(--fes-primary);
    text-decoration: none;
    font-weight: 600;
}

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

/* Cookie Buttons */
.cookie-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.95rem;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
}

.cookie-btn-primary {
    background: linear-gradient(135deg, var(--fes-primary), var(--fes-primary-dark));
    color: white;
}

.cookie-btn-primary:hover {
    background: linear-gradient(135deg, var(--fes-primary-dark), #3d5a8a);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(87, 127, 182, 0.3);
}

.cookie-btn-secondary {
    background: #f8f9fa;
    color: #495057;
    border: 2px solid #e9ecef;
}

.cookie-btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.cookie-btn-text {
    background: transparent;
    color: var(--fes-primary);
    padding: 0.75rem 1rem;
}

.cookie-btn-text:hover {
    background: rgba(87, 127, 182, 0.1);
}

/* Cookie Settings Modal */
.cookie-settings {
    display: none;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 2px solid #e9ecef;
}

.cookie-settings.show {
    display: block;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cookie-category {
    background: #f8f9fa;
    border-radius: 0.5rem;
    padding: 1.25rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    background: #e9ecef;
}

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

.cookie-category-title {
    font-weight: 700;
    font-size: 1.1rem;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-category-required {
    font-size: 0.75rem;
    color: #6c757d;
    font-weight: 500;
    padding: 0.25rem 0.5rem;
    background: #dee2e6;
    border-radius: 0.25rem;
}

.cookie-category-description {
    font-size: 0.9rem;
    color: #6c757d;
    line-height: 1.5;
}

/* Toggle Switch */
.cookie-toggle {
    position: relative;
    width: 52px;
    height: 28px;
}

.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: 28px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: var(--fes-primary);
}

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

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

/* Backdrop */
.cookie-backdrop {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 9998;
    backdrop-filter: blur(2px);
}

.cookie-backdrop.show {
    display: block;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Cookie Settings Link */
.cookie-settings-link {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: var(--fes-primary);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 12px rgba(87, 127, 182, 0.3);
    transition: all 0.3s ease;
    z-index: 1000;
    display: none;
}

.cookie-settings-link.show {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-settings-link:hover {
    background: var(--fes-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(87, 127, 182, 0.4);
    color: white;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-banner-content {
        padding: 1.5rem 0;
    }

    .cookie-header h3 {
        font-size: 1.25rem;
    }

    .cookie-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        justify-content: center;
    }

    .cookie-category {
        padding: 1rem;
    }

    .cookie-settings-link {
        bottom: 10px;
        left: 10px;
        font-size: 0.85rem;
        padding: 0.65rem 0.85rem;
    }
}

/* Print Styles */
@media print {
    #cookieBanner,
    .cookie-backdrop,
    .cookie-settings-link {
        display: none !important;
    }
}
