/**
 * Cookie Consent Banner & Modal Styles
 * GDPR-compliant cookie consent UI
 */

/* Cookie Banner */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 999999;
    animation: slideUp 0.4s ease-out;
}

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

.cookie-banner {
    background: linear-gradient(135deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 25px 20px;
    box-shadow: 0 -5px 30px rgba(0,0,0,0.3);
    border-top: 3px solid #f39c12;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-banner-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.3em;
    color: #f39c12;
}

.cookie-banner-text p {
    margin: 0 0 20px 0;
    line-height: 1.6;
    font-size: 0.95em;
    opacity: 0.95;
}

.cookie-banner-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95em;
    transition: all 0.3s ease;
    font-family: inherit;
}

.cookie-btn-accept {
    background: #f39c12;
    color: white;
}

.cookie-btn-accept:hover {
    background: #e67e22;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.4);
}

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

.cookie-btn-reject:hover {
    background: rgba(255, 255, 255, 0.1);
}

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

.cookie-btn-settings:hover {
    background: rgba(243, 156, 18, 0.1);
    border-color: #e67e22;
}

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

.cookie-btn-primary:hover {
    background: #2980b9;
}

.cookie-banner-links {
    font-size: 0.85em;
    opacity: 0.9;
}

.cookie-banner-links a {
    color: #f39c12;
    text-decoration: none;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.cookie-banner-links a:hover {
    border-bottom-color: #f39c12;
}

/* Cookie Preferences Modal */
#cookie-preferences-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1000000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
}

.cookie-modal {
    position: relative;
    background: white;
    border-radius: 12px;
    max-width: 800px;
    width: 90%;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
    animation: modalSlide 0.3s ease-out;
}

@keyframes modalSlide {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    padding: 25px;
    border-bottom: 2px solid #ecf0f1;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px 12px 0 0;
}

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

.cookie-modal-close {
    background: none;
    border: none;
    font-size: 2em;
    cursor: pointer;
    color: #7f8c8d;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s;
}

.cookie-modal-close:hover {
    background: rgba(0,0,0,0.1);
    color: #2c3e50;
}

.cookie-modal-body {
    padding: 25px;
    overflow-y: auto;
    flex: 1;
}

.cookie-modal-body > p {
    margin: 0 0 25px 0;
    color: #555;
    line-height: 1.6;
}

.cookie-category {
    margin-bottom: 25px;
    border: 2px solid #ecf0f1;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s;
}

.cookie-category:hover {
    border-color: #f39c12;
    box-shadow: 0 4px 12px rgba(243, 156, 18, 0.1);
}

.cookie-category-header {
    padding: 20px;
    background: #f8f9fa;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.cookie-category-header h3 {
    margin: 0 0 5px 0;
    color: #2c3e50;
    font-size: 1.1em;
}

.cookie-category-header p {
    margin: 0;
    color: #7f8c8d;
    font-size: 0.9em;
}

.cookie-category-details {
    padding: 20px;
    background: white;
    border-top: 1px solid #ecf0f1;
}

.cookie-category-details p {
    margin: 0 0 15px 0;
    color: #555;
    line-height: 1.6;
}

.cookie-category-details ul {
    margin: 10px 0 15px 20px;
    padding: 0;
}

.cookie-category-details li {
    margin-bottom: 8px;
    color: #555;
    line-height: 1.5;
}

.cookie-category-details code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #e74c3c;
    font-size: 0.9em;
}

.cookie-category-details a {
    color: #f39c12;
    text-decoration: none;
    border-bottom: 1px solid transparent;
}

.cookie-category-details a:hover {
    border-bottom-color: #f39c12;
}

/* Toggle Switch */
.cookie-toggle {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    gap: 10px;
}

.cookie-toggle input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: relative;
    width: 50px;
    height: 26px;
    background: #ccc;
    border-radius: 13px;
    transition: background 0.3s;
}

.cookie-toggle-slider::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    left: 3px;
    top: 3px;
    background: white;
    border-radius: 50%;
    transition: transform 0.3s;
}

.cookie-toggle input[type="checkbox"]:checked + .cookie-toggle-slider {
    background: #27ae60;
}

.cookie-toggle input[type="checkbox"]:checked + .cookie-toggle-slider::before {
    transform: translateX(24px);
}

.cookie-toggle input[type="checkbox"]:disabled + .cookie-toggle-slider {
    background: #95a5a6;
    opacity: 0.6;
    cursor: not-allowed;
}

.cookie-toggle-label {
    font-size: 0.85em;
    color: #7f8c8d;
    font-weight: 600;
}

.cookie-modal-footer {
    padding: 20px 25px;
    border-top: 2px solid #ecf0f1;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
    border-radius: 0 0 12px 12px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner {
        padding: 20px 15px;
    }

    .cookie-banner-text h3 {
        font-size: 1.1em;
    }

    .cookie-banner-text p {
        font-size: 0.9em;
    }

    .cookie-banner-buttons {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .cookie-modal {
        width: 95%;
        max-height: 90vh;
    }

    .cookie-modal-header {
        padding: 20px 15px;
    }

    .cookie-modal-header h2 {
        font-size: 1.2em;
    }

    .cookie-modal-body {
        padding: 20px 15px;
    }

    .cookie-category-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cookie-modal-footer {
        flex-direction: column;
        padding: 15px;
    }

    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-modal {
        width: 100%;
        height: 100%;
        max-height: 100vh;
        border-radius: 0;
    }

    .cookie-modal-header {
        border-radius: 0;
    }

    .cookie-modal-footer {
        border-radius: 0;
    }
}
