/**
 * DSGVO Cookie Consent Banner
 * Motz GmbH - Arbeitsbuhnenvermietung
 */

/* Cookie Banner Container */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(47, 45, 44, 0.98);
    color: #fff;
    padding: 20px;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 10000;
    display: none;
    animation: slideUp 0.4s ease-out;
}

#cookie-banner.show {
    display: block;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

.cookie-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 20px;
}

.cookie-text {
    flex: 1;
    min-width: 300px;
}

.cookie-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.2em;
    color: #f4e5fc;
}

.cookie-text p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.5;
}

.cookie-text a {
    color: #f4e5fc;
    text-decoration: underline;
}

.cookie-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1em;
    font-weight: bold;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cookie-btn-accept {
    background: #7800a8;
    color: white;
}

.cookie-btn-accept:hover {
    background: #5f0086;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(120, 0, 168, 0.3);
}

.cookie-btn-decline {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cookie-btn-decline:hover {
    background: rgba(255, 255, 255, 0.1);
}

.cookie-btn-settings {
    background: transparent;
    color: #f4e5fc;
    border: 1px solid #f4e5fc;
    padding: 10px 20px;
    font-size: 0.9em;
}

.cookie-btn-settings:hover {
    background: rgba(244, 229, 252, 0.1);
}

/* Cookie Settings Modal */
#cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10001;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cookie-settings-modal.show {
    display: flex;
}

.cookie-settings-content {
    background: white;
    padding: 30px;
    border-radius: 8px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
}

.cookie-settings-content h2 {
    color: #7800a8;
    margin-top: 0;
}

.cookie-settings-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #2F2D2C;
    padding: 5px 10px;
}

.cookie-settings-close:hover {
    color: #7800a8;
}

.cookie-category {
    margin: 20px 0;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
}

.cookie-category h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #2F2D2C;
}

.cookie-category p {
    margin: 10px 0;
    font-size: 0.9em;
    color: #666;
}

.cookie-toggle {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 10px 0;
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.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: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .toggle-slider {
    background-color: #7800a8;
}

input:checked + .toggle-slider:before {
    transform: translateX(26px);
}

input:disabled + .toggle-slider {
    background-color: #7800a8;
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-settings-buttons {
    display: flex;
    gap: 10px;
    margin-top: 20px;
    justify-content: flex-end;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-buttons {
        justify-content: stretch;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .cookie-settings-content {
        padding: 20px;
        margin: 10px;
    }
}

@media (max-width: 480px) {
    #cookie-banner {
        padding: 15px;
    }
    
    .cookie-text h3 {
        font-size: 1em;
    }
    
    .cookie-text p {
        font-size: 0.85em;
    }
    
    .cookie-btn {
        padding: 10px 16px;
        font-size: 0.9em;
    }
}
