/**
 * Cookie Banner CSS (GDPR/DSGVO Compliant)
 * 
 * Styles for enhanced cookie consent banner
 * 
 * @package Erosity_Booking
 */

/* Compact Banner (Initially shown) */
.erosity-cookie-banner-compact {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #fff;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    border-radius: 12px;
    padding: 20px 30px;
    z-index: 10000;
    max-width: 600px;
    width: 90%;
    animation: slideUp 0.3s ease-out;
}

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

.cookie-banner-compact-content {
    display: flex;
    align-items: center;
    gap: 20px;
}

.cookie-banner-compact-text {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.cookie-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.cookie-banner-compact-text p {
    margin: 0;
    font-size: 14px;
    color: #333;
}

.cookie-banner-compact-buttons {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}

/* Enhanced Modal Banner */
.erosity-cookie-banner-enhanced {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.cookie-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.cookie-banner-modal {
    position: relative;
    background: #fff;
    border-radius: 16px;
    max-width: 700px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    animation: modalFadeIn 0.3s ease-out;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.cookie-banner-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e5e5e5;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-banner-header h2 {
    margin: 0;
    font-size: 24px;
    color: #333;
}

.cookie-banner-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s;
}

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

.cookie-banner-body {
    padding: 30px;
    overflow-y: auto;
    flex: 1;
}

.cookie-banner-intro {
    margin: 0 0 25px 0;
    font-size: 15px;
    line-height: 1.6;
    color: #555;
}

/* Cookie Categories */
.cookie-categories {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.cookie-category {
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.cookie-category:hover {
    border-color: #667eea;
}

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: #f9f9f9;
    cursor: pointer;
    user-select: none;
}

.cookie-category-label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    flex: 1;
    margin: 0;
}

.cookie-category-label input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
}

.cookie-category-label input[type="checkbox"]:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

.cookie-category-title {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

.cookie-category-badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cookie-category-badge.required {
    background: #e3f2fd;
    color: #1976d2;
}

.cookie-category-toggle {
    background: none;
    border: none;
    padding: 5px;
    cursor: pointer;
    color: #999;
    transition: transform 0.3s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-category-toggle:hover {
    color: #667eea;
}

.cookie-category-toggle.active {
    transform: rotate(180deg);
}

.cookie-category-details {
    padding: 20px;
    background: #fff;
    border-top: 1px solid #e5e5e5;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        max-height: 0;
    }
    to {
        opacity: 1;
        max-height: 500px;
    }
}

.cookie-category-details p {
    margin: 0 0 15px 0;
    font-size: 14px;
    color: #666;
    line-height: 1.6;
}

.cookie-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.cookie-list li {
    padding: 8px 0;
    font-size: 13px;
    color: #666;
    border-bottom: 1px solid #f5f5f5;
}

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

.cookie-list li strong {
    color: #333;
    font-family: monospace;
    font-size: 13px;
}

/* Footer */
.cookie-banner-footer {
    padding: 20px 30px;
    border-top: 1px solid #e5e5e5;
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    background: #f9f9f9;
}

.cookie-banner-footer .button {
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
}

.cookie-banner-footer .button-primary {
    background: #667eea;
    color: #fff;
}

.cookie-banner-footer .button-primary:hover {
    background: #5568d3;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.3);
}

.cookie-banner-footer .button-secondary {
    background: #fff;
    color: #667eea;
    border: 1px solid #667eea;
}

.cookie-banner-footer .button-secondary:hover {
    background: #f5f7ff;
}

/* Cookie Settings FAB (Floating Action Button) */
.cookie-settings-fab {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #667eea;
    color: #fff;
    border: none;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    z-index: 9999;
}

.cookie-settings-fab:hover {
    background: #5568d3;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.cookie-settings-fab .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Button Styles */
.button-sm {
    padding: 8px 16px !important;
    font-size: 13px !important;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .erosity-cookie-banner-compact {
        bottom: 10px;
        width: 95%;
        padding: 15px 20px;
    }
    
    .cookie-banner-compact-content {
        flex-direction: column;
        gap: 15px;
    }
    
    .cookie-banner-compact-text {
        text-align: center;
        flex-direction: column;
    }
    
    .cookie-banner-compact-buttons {
        width: 100%;
    }
    
    .cookie-banner-compact-buttons .button {
        flex: 1;
    }
    
    .cookie-banner-modal {
        max-width: 100%;
        max-height: 95vh;
        margin: 10px;
    }
    
    .cookie-banner-header {
        padding: 20px;
    }
    
    .cookie-banner-header h2 {
        font-size: 20px;
    }
    
    .cookie-banner-body {
        padding: 20px;
    }
    
    .cookie-banner-footer {
        flex-direction: column;
        padding: 15px 20px;
    }
    
    .cookie-banner-footer .button {
        width: 100%;
    }
    
    .cookie-settings-fab {
        bottom: 15px;
        left: 15px;
        width: 45px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    .cookie-banner-compact-text p {
        font-size: 13px;
    }
    
    .cookie-category-header {
        padding: 12px 15px;
    }
    
    .cookie-category-title {
        font-size: 14px;
    }
    
    .cookie-category-details {
        padding: 15px;
    }
}

/* Accessibility */
.cookie-banner-modal:focus,
.cookie-category-header:focus,
.cookie-settings-fab:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .erosity-cookie-banner-compact,
    .cookie-banner-modal {
        background: #2a2a2a;
        color: #e0e0e0;
    }
    
    .cookie-banner-compact-text p,
    .cookie-banner-intro,
    .cookie-category-title {
        color: #e0e0e0;
    }
    
    .cookie-category {
        border-color: #444;
    }
    
    .cookie-category-header {
        background: #333;
    }
    
    .cookie-category-details {
        background: #2a2a2a;
        border-top-color: #444;
    }
    
    .cookie-banner-footer {
        background: #333;
        border-top-color: #444;
    }
    
    .cookie-list li {
        color: #b0b0b0;
        border-bottom-color: #444;
    }
    
    .cookie-list li strong {
        color: #e0e0e0;
    }
}
