/* Cookie Banner Styles - DSGVO-konform */

/* CSS Custom Properties for dynamic configuration */
:root {
    --cookie-button-color: #0f4b6c; /* Default button color */
}

/* Overlay - hidden by default, shown via .visible class */
.cookie-banner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 99999;
    display: none; /* Hidden by default */
    align-items: center;
    justify-content: center;
}

/* Show overlay when .visible class is added */
.cookie-banner-overlay.visible {
    display: flex;
    animation: fadeIn 0.3s ease-in-out;
}

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

/* Banner Container */
.cookie-banner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease-in-out;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Banner Views - hidden by default, shown via .active class */
.banner-view {
    display: none;
    flex-direction: column;
}

.banner-view.active {
    display: flex;
}

/* Header */
.banner-header {
    padding: 0.5rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.banner-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
}

.back-button {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #0f4b6c;
    cursor: pointer;
    padding: 0.5rem;
    margin-left: -0.5rem;
    transition: color 0.2s;
}

.back-button:hover {
    color: #286090;
}

/* Body */
.banner-body {
    padding: 0 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.banner-body p {
    line-height: 1.6;
    color: #555;
    margin-bottom: 1rem;
}

.banner-links {
    font-size: 0.9rem;
}

.banner-links a {
    color: #0f4b6c;
    text-decoration: none;
}

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

/* Actions */
.banner-actions {
    padding: 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* Buttons - WICHTIG: Beide Hauptbuttons identisch (DSGVO!) */
.cookie-btn {
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.cookie-btn-primary {
    background-color: var(--cookie-button-color, #0f4b6c);
    color: #fff;
}

.cookie-btn-primary:hover {
    background-color: var(--cookie-button-color, #286090);
    filter: brightness(1.1);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.cookie-btn-secondary {
    background-color: #f8f9fa;
    color: #333;
    border: 1px solid #dee2e6;
}

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

/* Cookie Categories - hidden by default, shown via .visible class */
.cookie-category {
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #f8f9fa;
    display: none;
}

.cookie-category.visible {
    display: block;
}

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

.category-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.category-info i {
    font-size: 1.2rem;
}

.cookie-category-description {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.5;
}

/* Badge */
.badge-required {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: #28a745;
    color: #fff;
    font-size: 0.75rem;
    border-radius: 4px;
    font-weight: 600;
}

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

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

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

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

.toggle-switch input:checked + .toggle-slider {
    background-color: #0f4b6c;
}

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

/* Alert */
.alert {
    padding: 0.75rem 1rem;
    border-radius: 6px;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.alert-info {
    background-color: #d1ecf1;
    border: 1px solid #bee5eb;
    color: #0c5460;
}

.alert i {
    margin-top: 0.1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner {
        width: 95%;
        max-height: 95vh;
    }

    .banner-header {
        padding: 1rem;
    }

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

    .banner-body {
        padding: 1rem;
    }

    .banner-actions {
        padding: 1rem;
    }

    .cookie-btn {
        padding: 0.75rem 1rem;
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .cookie-banner {
        border-radius: 0;
        max-height: 100vh;
        height: 85vh;
    }

    .category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
}

/* Settings Body Scrolling */
.settings-body {
    max-height: 65vh;
    overflow-y: auto;
    padding-top: 1rem;
}

/* Utility Classes */
.text-success {
    color: #28a745 !important;
}

.text-info {
    color: #17a2b8 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.mt-3 {
    margin-top: 1rem !important;
}
