/**
 * DSGVO/GDPR Compliant Cookie Consent Banner
 * ActNow GmbH - German Data Protection Compliance
 */

/* Cookie Banner Base Styles */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1.5rem;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #08D3BB;
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.3);
}

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

.cookie-consent-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.cookie-consent-text {
    flex: 1;
    min-width: 300px;
}

.cookie-consent-text h3 {
    font-size: 1.125rem;
    font-weight: 700;
    margin: 0 0 0.5rem 0;
    color: #08D3BB;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    opacity: 0.9;
}

.cookie-consent-text a {
    color: #08D3BB;
    text-decoration: underline;
    transition: color 0.2s;
}

.cookie-consent-text a:hover {
    color: #06B8A6;
}

.cookie-consent-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    align-items: center;
}

/* Button Styles */
.cookie-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.cookie-btn-accept {
    background: #08D3BB;
    color: #000;
}

.cookie-btn-accept:hover {
    background: #06B8A6;
    transform: translateY(-1px);
}

.cookie-btn-reject {
    background: transparent;
    color: white;
    border: 2px solid #666;
}

.cookie-btn-reject:hover {
    border-color: #08D3BB;
    color: #08D3BB;
}

/* Modal-specific button styling */
.cookie-preferences-content .cookie-btn-reject {
    background: transparent;
    color: #666;
    border: 2px solid #666;
}

.cookie-preferences-content .cookie-btn-reject:hover {
    border-color: #08D3BB;
    color: #08D3BB;
    background: transparent;
}

.cookie-btn-settings {
    background: transparent;
    color: #08D3BB;
    border: 2px solid #08D3BB;
}

.cookie-btn-settings:hover {
    background: #08D3BB;
    color: #000;
}

/* Cookie Preferences Modal */
.cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.cookie-preferences-modal.show {
    opacity: 1;
    visibility: visible;
}

.cookie-preferences-content {
    background: white;
    border-radius: 1rem;
    padding: 2rem;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    color: #333;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.cookie-preferences-content h2 {
    color: #333;
    margin: 0 0 1rem 0;
    font-size: 1.5rem;
}

.cookie-category {
    margin: 1.5rem 0;
    padding: 1rem;
    border: 1px solid #e5e5e5;
    border-radius: 0.5rem;
}

.cookie-category h3 {
    margin: 0 0 0.5rem 0;
    color: #333;
    font-size: 1.1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.cookie-category p {
    margin: 0.5rem 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.5;
}

.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.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;
    border-radius: 24px;
    transition: 0.3s;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #08D3BB;
}

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

.cookie-toggle-disabled {
    opacity: 0.5;
    pointer-events: none;
}

.cookie-preferences-actions {
    margin-top: 2rem;
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    flex-wrap: wrap;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }
    
    .cookie-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .cookie-preferences-content {
        margin: 1rem;
        padding: 1.5rem;
    }
    
    .cookie-preferences-actions {
        flex-direction: column;
    }
    
    .cookie-preferences-actions .cookie-btn {
        width: 100%;
    }
}

/* Accessibility */
.cookie-btn:focus,
.cookie-toggle:focus-within .cookie-toggle-slider {
    outline: 2px solid #08D3BB;
    outline-offset: 2px;
}

/* Animation for smooth appearance */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-consent-banner.animate-in {
    animation: slideUp 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}