/* Sistema de Consentimiento de Cookies - Integrado con diseño RUCA INTEGRAL */

/* ========================================
   BANNER DE COOKIES
   ======================================== */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    background: linear-gradient(145deg, rgba(20,20,20,0.95) 0%, rgba(10,10,10,0.98) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(180, 255, 25, 0.15);
    box-shadow: 0 -10px 40px rgba(0,0,0,0.8), 0 0 20px rgba(180, 255, 25, 0.05);
    padding: 24px;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    max-width: 100vw;
}

.cookie-banner.show {
    transform: translateY(0);
    opacity: 1;
}

.cookie-banner.hidden {
    transform: translateY(100%);
    opacity: 0;
    pointer-events: none;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

@media (min-width: 768px) {
    .cookie-banner {
        padding: 32px;
    }
    
    .cookie-banner-content {
        flex-direction: row;
        align-items: flex-start;
        justify-content: space-between;
        gap: 32px;
    }
}

.cookie-banner-text {
    flex: 1;
    min-width: 0;
}

.cookie-banner-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.cookie-banner-title::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #B4FF19;
    border-radius: 50%;
    box-shadow: 0 0 10px rgba(180, 255, 25, 0.6);
}

.cookie-banner-description {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    color: #B8B8B8;
    line-height: 1.6;
    margin-bottom: 16px;
}

.cookie-banner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
}

.cookie-banner-link {
    color: #B4FF19;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.cookie-banner-link:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(180, 255, 25, 0.5);
}

.cookie-banner-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 200px;
    flex-shrink: 0;
}

@media (min-width: 768px) {
    .cookie-banner-buttons {
        flex-direction: row;
        align-items: center;
        gap: 12px;
    }
}

.cookie-btn {
    font-family: 'Manrope', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 12px 24px;
    border-radius: 99px;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
    white-space: nowrap;
}

.cookie-btn-accept {
    background: #B4FF19;
    color: #000000;
    box-shadow: 0 0 15px rgba(180, 255, 25, 0.3);
}

.cookie-btn-accept:hover {
    box-shadow: 0 0 30px rgba(180, 255, 25, 0.6);
    transform: translateY(-2px) scale(1.02);
}

.cookie-btn-configure {
    background: transparent;
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cookie-btn-configure:hover {
    border-color: #B4FF19;
    color: #B4FF19;
    background: rgba(180, 255, 25, 0.05);
}

.cookie-btn-reject {
    background: transparent;
    color: #B8B8B8;
    border: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.85rem;
    padding: 10px 20px;
}

.cookie-btn-reject:hover {
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.3);
}

.cookie-banner-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #B8B8B8;
}

.cookie-banner-close:hover {
    background: rgba(180, 255, 25, 0.1);
    border-color: #B4FF19;
    color: #B4FF19;
}

/* ========================================
   MODAL DE CONFIGURACIÓN
   ======================================== */
.cookie-modal-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.cookie-modal-overlay.show {
    opacity: 1;
    visibility: visible;
}

.cookie-modal-overlay.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.cookie-modal {
    background: linear-gradient(145deg, rgba(20,20,20,0.98) 0%, rgba(10,10,10,0.99) 100%);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(180, 255, 25, 0.15);
    border-radius: 1.5rem;
    box-shadow: 0 25px 50px rgba(0,0,0,0.9), 0 0 30px rgba(180, 255, 25, 0.08);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.95) translateY(20px);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.cookie-modal.show {
    transform: scale(1) translateY(0);
}

@media (max-width: 640px) {
    .cookie-modal {
        max-height: 100vh;
        border-radius: 0;
        max-width: 100%;
    }
    
    .cookie-modal-overlay {
        padding: 0;
    }
}

.cookie-modal-header {
    padding: 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 10;
}

.cookie-modal-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: #ffffff;
}

.cookie-modal-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: #B8B8B8;
}

.cookie-modal-close:hover {
    background: rgba(180, 255, 25, 0.1);
    border-color: #B4FF19;
    color: #B4FF19;
}

.cookie-modal-body {
    padding: 24px;
}

.cookie-modal-intro {
    font-family: 'Manrope', sans-serif;
    font-size: 0.95rem;
    color: #B8B8B8;
    line-height: 1.6;
    margin-bottom: 24px;
}

.cookie-category {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 1rem;
    margin-bottom: 16px;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: rgba(180, 255, 25, 0.1);
    background: rgba(255, 255, 255, 0.03);
}

.cookie-category-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.cookie-category-info {
    flex: 1;
    min-width: 0;
}

.cookie-category-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 4px;
}

.cookie-category-description {
    font-family: 'Manrope', sans-serif;
    font-size: 0.85rem;
    color: #B8B8B8;
    line-height: 1.4;
}

/* Custom Switch */
.cookie-switch {
    position: relative;
    width: 52px;
    height: 28px;
    flex-shrink: 0;
}

.cookie-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-switch-slider {
    position: absolute;
    cursor: pointer;
    inset: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-switch-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 3px;
    background: #B8B8B8;
    border-radius: 50%;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.cookie-switch input:checked + .cookie-switch-slider {
    background: rgba(180, 255, 25, 0.2);
    border-color: #B4FF19;
}

.cookie-switch input:checked + .cookie-switch-slider:before {
    transform: translateX(24px);
    background: #B4FF19;
    box-shadow: 0 0 10px rgba(180, 255, 25, 0.5);
}

.cookie-switch.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.cookie-switch.disabled .cookie-switch-slider {
    cursor: not-allowed;
}

.cookie-modal-footer {
    padding: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: sticky;
    bottom: 0;
    background: rgba(10, 10, 10, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

@media (min-width: 640px) {
    .cookie-modal-footer {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
}

.cookie-modal-links {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 0.85rem;
}

.cookie-modal-link {
    color: #B4FF19;
    text-decoration: none;
    transition: all 0.3s ease;
}

.cookie-modal-link:hover {
    color: #ffffff;
    text-shadow: 0 0 10px rgba(180, 255, 25, 0.5);
}

.cookie-modal-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.cookie-modal-buttons .cookie-btn {
    flex: 1;
    min-width: 140px;
}

@media (min-width: 640px) {
    .cookie-modal-buttons .cookie-btn {
        flex: 0 0 auto;
    }
}

/* ========================================
   BOTÓN FLOTANTE DE PREFERENCIAS
   ======================================== */
.cookie-preferences-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Manrope', sans-serif;
    font-size: 0.8rem;
    color: #B8B8B8;
    text-decoration: none;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid transparent;
}

.cookie-preferences-btn:hover {
    color: #B4FF19;
    border-color: rgba(180, 255, 25, 0.2);
    background: rgba(180, 255, 25, 0.05);
}

.cookie-preferences-btn i {
    width: 16px;
    height: 16px;
}

/* ========================================
   ACCESIBILIDAD Y FOCUS
   ======================================== */
.cookie-btn:focus,
.cookie-banner-close:focus,
.cookie-modal-close:focus,
.cookie-switch input:focus + .cookie-switch-slider,
.cookie-preferences-btn:focus {
    outline: 2px solid #B4FF19;
    outline-offset: 2px;
}

/* ========================================
   PREFERS-REDUCED-MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal,
    .cookie-modal-overlay,
    .cookie-btn,
    .cookie-switch-slider,
    .cookie-switch-slider:before,
    .cookie-category {
        transition: none;
        animation: none;
    }
}

/* ========================================
   SCROLLBAR PERSONALIZADO PARA MODAL
   ======================================== */
.cookie-modal::-webkit-scrollbar {
    width: 6px;
}

.cookie-modal::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
}

.cookie-modal::-webkit-scrollbar-thumb {
    background: rgba(180, 255, 25, 0.3);
    border-radius: 3px;
}

.cookie-modal::-webkit-scrollbar-thumb:hover {
    background: rgba(180, 255, 25, 0.5);
}