/* Cookie Banner Styles */
.cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    max-width: 400px;
    max-height: 80vh; /* Maximale Höhe begrenzen */
    background-color: rgba(255, 255, 255, 0.98);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 24px;
    z-index: 9999;
    font-size: 14px;
    transform: translateY(150%);
    transition: transform 0.5s ease, box-shadow 0.3s ease;
    color: #333;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.cookie-banner.show {
    transform: translateY(0);
}

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

.cookie-banner-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    background: linear-gradient(45deg, var(--logo-gradient-start, #005ea8), var(--logo-gradient-end, #0078d4));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.cookie-banner-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: #666;
    padding: 0;
    transition: color 0.2s ease;
}

.cookie-banner-close:hover {
    color: #333;
}

.cookie-banner-content {
    margin-bottom: 15px;
    max-height: calc(80vh - 150px); /* Platz für Header und Buttons lassen */
    overflow-y: auto; /* Vertikales Scrollen ermöglichen */
    padding-right: 5px; /* Platz für Scrollbar */
}

.cookie-banner-content p {
    margin: 0 0 18px;
    line-height: 1.5;
}

.cookie-banner-settings {
    margin-top: 18px;
    display: none;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease, opacity 0.3s ease;
    opacity: 0;
}

.cookie-banner-settings.show {
    display: block;
    max-height: 500px;
    opacity: 1;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
    position: relative;
}

.cookie-option:last-child {
    border-bottom: none;
}

.cookie-option-info {
    flex: 1;
    padding-right: 15px;
}

.cookie-option-label {
    font-weight: 600;
    margin-bottom: 4px;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.cookie-option-toggle {
    margin-left: 6px;
    font-size: 12px;
    color: #0078d4;
    transition: transform 0.3s ease;
}

.cookie-option-toggle.expanded {
    transform: rotate(180deg);
}

.cookie-option-details {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, opacity 0.3s ease, margin 0.3s ease;
    opacity: 0;
    margin-top: 0;
    font-size: 13px;
    color: #666;
}

.cookie-option-details.expanded {
    max-height: 200px;
    opacity: 1;
    margin-top: 8px;
}

.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: #ddd;
    transition: .4s;
    border-radius: 24px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.1);
}

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

input:checked + .cookie-slider {
    background: linear-gradient(45deg, var(--logo-gradient-start, #005ea8), var(--logo-gradient-end, #0078d4));
}

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

.cookie-banner-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 12px;
}

.cookie-banner-button {
    padding: 10px 18px;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 14px;
    text-align: center;
}

.cookie-settings-button {
    background: none;
    border: 1px solid #ddd;
    color: #555;
}

.cookie-settings-button:hover {
    background-color: #f5f5f5;
    border-color: #ccc;
}

.cookie-accept-button {
    background: linear-gradient(45deg, var(--logo-gradient-start, #005ea8), var(--logo-gradient-end, #0078d4));
    color: white;
    box-shadow: 0 2px 5px rgba(0, 94, 168, 0.2);
}

.cookie-accept-button:hover {
    opacity: 0.9;
    box-shadow: 0 3px 7px rgba(0, 94, 168, 0.3);
    transform: translateY(-1px);
}

.cookie-save-button {
    background: linear-gradient(45deg, var(--logo-gradient-start, #005ea8), var(--logo-gradient-end, #0078d4));
    color: white;
    display: none;
    box-shadow: 0 2px 5px rgba(0, 94, 168, 0.2);
}

.cookie-save-button.show {
    display: block;
}

.cookie-save-button:hover {
    opacity: 0.9;
    box-shadow: 0 3px 7px rgba(0, 94, 168, 0.3);
    transform: translateY(-1px);
}

/* Cookie category badges */
.cookie-category-badge {
    display: inline-block;
    font-size: 11px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 8px;
    font-weight: normal;
    vertical-align: middle;
}

.cookie-category-badge.essential {
    background-color: #e6f3ff;
    color: #0078d4;
}

.cookie-category-badge.analytics {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.cookie-category-badge.marketing {
    background-color: #fff8e1;
    color: #ff8f00;
}

.cookie-category-badge.lodgify {
    background-color: #f3e5f5;
    color: #7b1fa2;
}

/* Mobile Styles */
@media (max-width: 576px) {
    .cookie-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
        max-width: calc(100% - 20px);
        padding: 20px;
    }
    
    .cookie-banner-buttons {
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-banner-button {
        width: 100%;
    }
    
    .cookie-option {
        flex-direction: column;
    }
    
    .cookie-switch {
        margin-top: 10px;
    }
    
    .cookie-option-info {
        padding-right: 0;
    }
}
