/**
 * Cookie Consent Banner Styles
 * Modern, accessible, and responsive design
 */

/* ===== Cookie Consent Banner ===== */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 99999;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(100%);
    transition: transform 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    font-family: 'Poppins', sans-serif;
}

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

.cookie-consent-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

.cookie-consent-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    flex: 1;
    min-width: 300px;
}

.cookie-consent-icon {
    font-size: 2.5rem;
    color: #FF6B35;
    animation: cookieBounce 2s ease-in-out infinite;
}

@keyframes cookieBounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    25% { transform: translateY(-5px) rotate(-5deg); }
    75% { transform: translateY(-5px) rotate(5deg); }
}

.cookie-consent-text h4 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.cookie-consent-text p {
    color: #b8b8b8;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

.cookie-link {
    color: #FF6B35;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.cookie-link:hover {
    color: #ff8c5a;
}

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

/* ===== Cookie Buttons ===== */
.cookie-btn {
    padding: 0.75rem 1.5rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    font-family: inherit;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #FF6B35 0%, #f7931e 100%);
    color: #ffffff;
    border-color: #FF6B35;
}

.cookie-btn-accept:hover {
    background: linear-gradient(135deg, #ff8c5a 0%, #ffaa4d 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(255, 107, 53, 0.4);
}

.cookie-btn-reject {
    background: transparent;
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

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

.cookie-btn-settings {
    background: transparent;
    color: #b8b8b8;
    border-color: transparent;
}

.cookie-btn-settings:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

.cookie-btn-save {
    background: #004E89;
    color: #ffffff;
    border-color: #004E89;
}

.cookie-btn-save:hover {
    background: #0066b3;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0, 78, 137, 0.4);
}

/* ===== Cookie Settings Modal ===== */
.cookie-settings-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 100000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.cookie-settings-modal.active {
    opacity: 1;
    visibility: visible;
}

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

.cookie-settings-content {
    position: relative;
    background: #ffffff;
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s ease;
}

.cookie-settings-modal.active .cookie-settings-content {
    transform: scale(1) translateY(0);
}

.cookie-settings-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%);
    color: #ffffff;
}

.cookie-settings-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.cookie-settings-close {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #ffffff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s ease;
}

.cookie-settings-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.cookie-settings-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex: 1;
}

.cookie-settings-intro {
    color: #666;
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.cookie-category {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    transition: border-color 0.3s ease;
}

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

.cookie-category-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
}

.cookie-category-info h5 {
    color: #1a1a2e;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 0.5rem 0;
}

.cookie-category-info h5 i {
    color: #FF6B35;
}

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

.cookie-toggle {
    flex-shrink: 0;
}

.cookie-always-on {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 0.35rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
}

/* ===== Toggle Switch ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
}

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

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

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

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, #FF6B35 0%, #f7931e 100%);
}

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

.toggle-switch input:focus + .toggle-slider {
    box-shadow: 0 0 0 3px rgba(255, 107, 53, 0.3);
}

/* ===== Settings Footer ===== */
.cookie-settings-footer {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    padding: 1.25rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid #e9ecef;
}

/* ===== Responsive Design ===== */
@media (max-width: 768px) {
    .cookie-consent-container {
        flex-direction: column;
        padding: 1.25rem;
        text-align: center;
    }

    .cookie-consent-content {
        flex-direction: column;
        align-items: center;
        min-width: 100%;
    }

    .cookie-consent-icon {
        font-size: 2rem;
    }

    .cookie-consent-text {
        text-align: center;
    }

    .cookie-consent-text h4 {
        font-size: 1.1rem;
    }

    .cookie-consent-text p {
        font-size: 0.85rem;
    }

    .cookie-consent-actions {
        width: 100%;
        justify-content: center;
    }

    .cookie-btn {
        padding: 0.6rem 1.25rem;
        font-size: 0.85rem;
    }

    .cookie-settings-content {
        width: 95%;
        max-height: 85vh;
    }

    .cookie-settings-header {
        padding: 1.25rem;
    }

    .cookie-settings-header h4 {
        font-size: 1.1rem;
    }

    .cookie-settings-body {
        padding: 1.25rem;
    }

    .cookie-category-header {
        flex-direction: column;
        gap: 0.75rem;
    }

    .cookie-toggle {
        align-self: flex-end;
    }

    .cookie-settings-footer {
        flex-wrap: wrap;
        padding: 1rem;
    }

    .cookie-settings-footer .cookie-btn {
        flex: 1;
        min-width: calc(50% - 0.5rem);
    }

    .cookie-settings-footer .cookie-btn-save {
        order: 1;
        min-width: 100%;
    }
}

@media (max-width: 480px) {
    .cookie-consent-actions {
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
    }

    .cookie-settings-footer {
        flex-direction: column;
    }

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

/* ===== Accessibility ===== */
@media (prefers-reduced-motion: reduce) {
    .cookie-consent-banner,
    .cookie-settings-modal,
    .cookie-settings-content,
    .cookie-btn,
    .toggle-slider,
    .toggle-slider:before {
        transition: none;
    }

    .cookie-consent-icon {
        animation: none;
    }
}

/* ===== Print ===== */
@media print {
    .cookie-consent-banner,
    .cookie-settings-modal {
        display: none !important;
    }
}

