/**
 * Cookie Consent Popup Styles
 * GDPR-compliant cookie consent banner and modal
 */

/* Cookie Consent Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.3s ease-in-out;
    border-top: 3px solid #3498db;
}

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

.cookie-consent-banner.hide {
    transform: translateY(100%);
}

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

.cookie-consent-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.2em;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-consent-text p {
    margin: 0;
    font-size: 0.95em;
    line-height: 1.4;
    opacity: 0.9;
}

.cookie-consent-actions {
    display: flex;
    gap: 12px;
    flex-shrink: 0;
}

/* Cookie Modal */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    padding: 20px;
}

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

.cookie-modal-overlay.hide {
    opacity: 0;
    visibility: hidden;
}

.cookie-modal {
    background: white;
    border-radius: 12px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease-in-out;
}

.cookie-modal-overlay.show .cookie-modal {
    transform: scale(1) translateY(0);
}

.cookie-modal-header {
    padding: 24px 24px 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eee;
    padding-bottom: 16px;
    margin-bottom: 20px;
}

.cookie-modal-header h3 {
    margin: 0;
    font-size: 1.4em;
    color: #2c3e50;
}

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

.cookie-modal-close:hover {
    background: #f8f9fa;
    color: #666;
}

.cookie-modal-body {
    padding: 0 24px;
}

.cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #f8f9fa;
}

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

.cookie-category h4 {
    margin: 0;
    font-size: 1.1em;
    color: #2c3e50;
    font-weight: 600;
}

.cookie-category p {
    margin: 0;
    font-size: 0.9em;
    color: #666;
    line-height: 1.5;
}

.cookie-modal-footer {
    padding: 20px 24px 24px 24px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

/* Cookie Toggle Switch */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    cursor: pointer;
}

.cookie-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-slider {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

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

.cookie-toggle input:checked + .cookie-slider {
    background-color: #3498db;
}

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

.cookie-toggle input:disabled + .cookie-slider {
    background-color: #27ae60;
    cursor: not-allowed;
}

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

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 6px;
    font-size: 0.9em;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    min-width: 100px;
}

.btn-primary {
    background: #3498db;
    color: white;
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(149, 165, 166, 0.3);
}

.btn-outline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Cookie Status Indicator */
#cookie-status {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #2c3e50;
    color: white;
    padding: 8px 12px;
    border-radius: 20px;
    font-size: 0.8em;
    z-index: 1000;
    opacity: 0.8;
    transition: opacity 0.2s ease;
}

#cookie-status:hover {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-consent-content {
        flex-direction: column;
        text-align: center;
        gap: 16px;
    }
    
    .cookie-consent-actions {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .cookie-modal {
        margin: 10px;
        max-height: 90vh;
    }
    
    .cookie-modal-header,
    .cookie-modal-body,
    .cookie-modal-footer {
        padding-left: 16px;
        padding-right: 16px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
    
    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 16px;
    }
    
    .cookie-consent-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .btn {
        padding: 12px 16px;
        font-size: 0.95em;
    }
}

/* Animation for cookie icons */
@keyframes cookieBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-4px);
    }
    60% {
        transform: translateY(-2px);
    }
}

.cookie-consent-text h3 span {
    animation: cookieBounce 2s infinite;
    display: inline-block;
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .cookie-modal {
        background: #2c3e50;
        color: white;
    }
    
    .cookie-modal-header {
        border-bottom-color: #34495e;
    }
    
    .cookie-modal-footer {
        border-top-color: #34495e;
    }
    
    .cookie-category {
        background: #34495e;
        border-color: #4a5f7a;
    }
    
    .cookie-modal-close:hover {
        background: #34495e;
        color: #bdc3c7;
    }
}

/* Accessibility improvements */
.cookie-toggle:focus-within .cookie-slider {
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.3);
}

.btn:focus {
    outline: 2px solid #3498db;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .cookie-consent-banner {
        border-top-width: 5px;
    }
    
    .cookie-modal {
        border: 2px solid #000;
    }
    
    .btn {
        border: 2px solid currentColor;
    }
}
