/* ========================================
   COOKIE CONSENT BANNER & MODAL
   GDPR/UK PECR Compliant
   ======================================== */

/* Cookie Banner */
.cookie-consent-banner {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8c 100%);
    color: white;
    padding: 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.2);
    z-index: 9999;
    transition: bottom 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #00d4ff;
}

.cookie-consent-banner.show {
    bottom: 0;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
}

.cookie-banner-text {
    flex: 1;
    min-width: 280px;
}

.cookie-banner-text h3 {
    margin: 0 0 8px 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #00d4ff;
}

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

.cookie-banner-text a {
    color: #00d4ff;
    text-decoration: underline;
    transition: opacity 0.3s;
}

.cookie-banner-text a:hover {
    opacity: 0.8;
}

.cookie-banner-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: #00d4ff;
    color: #1e3a5f;
}

.cookie-btn-accept:hover {
    background: #00b8e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

.cookie-btn-reject {
    background: transparent;
    color: white;
    border: 2px solid 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-customize {
    background: transparent;
    color: #00d4ff;
    border: 2px solid #00d4ff;
}

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

/* Cookie Preferences Modal */
.cookie-preferences-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(30, 58, 95, 0.85);
    backdrop-filter: blur(5px);
    z-index: 10000;
    padding: 20px;
    overflow-y: auto;
}

.cookie-preferences-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-modal-content {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
}

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

.cookie-modal-header {
    background: linear-gradient(135deg, #1e3a5f 0%, #2d5a8c 100%);
    color: white;
    padding: 24px 30px;
    border-radius: 16px 16px 0 0;
    position: relative;
}

.cookie-modal-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.cookie-modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 28px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    line-height: 1;
}

.cookie-modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

.cookie-modal-body {
    padding: 30px;
}

.cookie-category {
    margin-bottom: 24px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 12px;
    border-left: 4px solid #00d4ff;
}

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

.cookie-category-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1e3a5f;
    font-weight: 600;
}

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

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

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #00d4ff;
}

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

.cookie-toggle input:disabled + .cookie-toggle-slider {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-category-description {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin: 0;
}

.cookie-badge {
    display: inline-block;
    background: #e8f4f8;
    color: #0277bd;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 8px;
}

.cookie-modal-footer {
    padding: 20px 30px;
    background: #f8f9fa;
    border-radius: 0 0 16px 16px;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.cookie-btn-save {
    background: #00d4ff;
    color: #1e3a5f;
    padding: 12px 32px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
}

.cookie-btn-save:hover {
    background: #00b8e6;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 212, 255, 0.3);
}

/* Responsive Design */
@media (max-width: 768px) {
    .cookie-banner-content {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .cookie-banner-text {
        min-width: 100%;
    }

    .cookie-banner-actions {
        width: 100%;
        flex-direction: column;
    }

    .cookie-btn {
        width: 100%;
        text-align: center;
    }

    .cookie-modal-content {
        margin: 10px;
        max-height: calc(100vh - 20px);
    }

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

    .cookie-modal-header h2 {
        font-size: 1.3rem;
        padding-right: 40px;
    }

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

    .cookie-category {
        padding: 16px;
    }

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

@media (max-width: 480px) {
    .cookie-consent-banner {
        padding: 15px;
    }

    .cookie-banner-text h3 {
        font-size: 1rem;
    }

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

    .cookie-btn {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}
