/* Cookie-Consent-Styles - isoliert mit Namespace */
.gdpr-consent {
    /* Variablen innerhalb des .gdpr-consent-Namespaces halten */
    --primary: #0d6efd;
    --primary-hover: #0b5ed7;
    --bg-overlay: rgba(0, 0, 0, 0.4);
    --transition: all 0.3s ease;
    
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(200%);
    width: 90%;
    max-width: 32rem;
    background: white;
    border-radius: 1rem;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    opacity: 0;
    transition: var(--transition);
    z-index: 9999;
}

.gdpr-consent.active {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Präfixiere alle Selektoren mit .gdpr-consent */
.gdpr-consent .gdpr-content {
    padding: 1.5rem;
}

.gdpr-consent .gdpr-header {
    margin-bottom: 1rem;
}

.gdpr-consent .gdpr-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.gdpr-consent .gdpr-description {
    font-size: 0.875rem;
    line-height: 1.5;
    color: #4b5563;
    margin: 0;
}

.gdpr-consent .gdpr-preferences {
    margin: 1.5rem 0;
}

.gdpr-consent .preference-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.gdpr-consent .switch {
    position: relative;
    display: inline-block;
    width: 3rem;
    height: 1.5rem;
}

.gdpr-consent .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.gdpr-consent .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: var(--transition);
    border-radius: 1rem;
}

.gdpr-consent .slider:before {
    position: absolute;
    content: "";
    height: 1.25rem;
    width: 1.25rem;
    left: 0.125rem;
    bottom: 0.125rem;
    background-color: white;
    transition: var(--transition);
    border-radius: 50%;
}

.gdpr-consent input:checked + .slider {
    background-color: var(--primary);
}

.gdpr-consent input:disabled + .slider {
    opacity: 0.7;
    cursor: not-allowed;
}

.gdpr-consent input:checked + .slider:before {
    transform: translateX(1.5rem);
}

.gdpr-consent .preference-label {
    font-size: 0.875rem;
    color: #4b5563;
}

.gdpr-consent .gdpr-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
}

.gdpr-consent .gdpr-actions .btn {
    flex: 1;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
    border: none;
}

.gdpr-consent .gdpr-actions .btn-primary {
    background-color: var(--primary);
    color: white;
}

.gdpr-consent .gdpr-actions .btn-primary:hover {
    background-color: var(--primary-hover);
}

.gdpr-consent .gdpr-actions .btn-secondary {
    background-color: #f3f4f6;
    color: #4b5563;
}

.gdpr-consent .gdpr-actions .btn-secondary:hover {
    background-color: #e5e7eb;
}

.gdpr-consent .gdpr-actions .btn-outline {
    background-color: transparent;
    color: #4b5563;
    border: 1px solid #e5e7eb;
}

.gdpr-consent .gdpr-actions .btn-outline:hover {
    background-color: #f3f4f6;
}

/* Overlay muss separat definiert werden, da es außerhalb der .gdpr-consent Box ist */
#consentOverlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 9998;
}

#consentOverlay.active {
    opacity: 1;
    visibility: visible;
}

@media (max-width: 640px) {
    .gdpr-consent .gdpr-actions {
        flex-direction: column;
    }
    
    .gdpr-consent {
        bottom: 0;
        border-radius: 1rem 1rem 0 0;
        max-width: 100%;
        width: 100%;
    }
}