/* ============================================================
   KOBALTO ACADEMY - Estilos para Banner de Cookies RGPD
   ============================================================ */

/* ============================================================
   BANNER DE COOKIES
   ============================================================ */

.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: var(--azul-corporativo, #042454);
    padding: 1.25rem 1.5rem;
    z-index: 10000;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
}

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

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

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

.cookie-text h3 {
    color: var(--dorado, #FFC700);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-text p {
    color: var(--azul-claro, #EAEEFF);
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-text a {
    color: var(--dorado, #FFC700);
    text-decoration: underline;
    transition: opacity 0.2s;
}

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

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

/* ============================================================
   BOTONES
   ============================================================ */

.cookie-btn {
    padding: 0.7rem 1.25rem;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
    white-space: nowrap;
}

.cookie-btn-primary {
    background: var(--dorado, #FFC700);
    color: var(--azul-corporativo, #042454);
    border-color: var(--dorado, #FFC700);
}

.cookie-btn-primary:hover {
    background: transparent;
    color: var(--dorado, #FFC700);
}

.cookie-btn-secondary {
    background: transparent;
    color: var(--azul-claro, #EAEEFF);
    border-color: var(--azul-claro, #EAEEFF);
}

.cookie-btn-secondary:hover {
    background: var(--azul-claro, #EAEEFF);
    color: var(--azul-corporativo, #042454);
}

/* ============================================================
   MODAL DE CONFIGURACIÓN
   ============================================================ */

.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 36, 84, 0.9);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

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

.cookie-modal-content {
    background: var(--azul-navy, #1E3A5F);
    border-radius: 12px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
    transform: scale(0.95);
    transition: transform 0.3s;
}

.cookie-modal.visible .cookie-modal-content {
    transform: scale(1);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(234, 238, 255, 0.1);
}

.cookie-modal-header h3 {
    color: var(--dorado, #FFC700);
    font-size: 1.2rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.cookie-modal-close {
    background: none;
    border: none;
    color: var(--azul-claro, #EAEEFF);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    line-height: 1;
    transition: color 0.2s;
}

.cookie-modal-close:hover {
    color: var(--dorado, #FFC700);
}

.cookie-modal-body {
    padding: 1.5rem;
}

.cookie-modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    display: flex;
    justify-content: flex-end;
}

/* ============================================================
   OPCIONES DE COOKIES
   ============================================================ */

.cookie-option {
    background: rgba(4, 36, 84, 0.5);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.cookie-option:last-child {
    margin-bottom: 0;
}

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

.cookie-option-info {
    flex: 1;
}

.cookie-option-info h4 {
    color: var(--azul-claro, #EAEEFF);
    font-size: 1rem;
    margin: 0 0 0.35rem 0;
}

.cookie-option-info p {
    color: rgba(234, 238, 255, 0.7);
    font-size: 0.85rem;
    line-height: 1.4;
    margin: 0;
}

/* ============================================================
   TOGGLE SWITCH
   ============================================================ */

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

.cookie-toggle input {
    display: none;
}

.cookie-toggle label {
    display: block;
    width: 50px;
    height: 28px;
    background: rgba(234, 238, 255, 0.2);
    border-radius: 14px;
    position: relative;
    cursor: pointer;
    transition: background 0.3s;
}

.cookie-toggle label::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: var(--azul-claro, #EAEEFF);
    border-radius: 50%;
    transition: transform 0.3s;
}

.cookie-toggle input:checked + label {
    background: var(--dorado, #FFC700);
}

.cookie-toggle input:checked + label::after {
    transform: translateX(22px);
    background: var(--azul-corporativo, #042454);
}

.cookie-toggle.disabled label {
    opacity: 0.5;
    cursor: not-allowed;
}

/* ============================================================
   BOTÓN FLOTANTE DE CONFIGURACIÓN
   ============================================================ */

.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--azul-corporativo, #042454);
    color: var(--dorado, #FFC700);
    border: 2px solid var(--dorado, #FFC700);
    font-size: 1.25rem;
    cursor: pointer;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8);
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.cookie-settings-btn.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.cookie-settings-btn:hover {
    background: var(--dorado, #FFC700);
    color: var(--azul-corporativo, #042454);
    transform: scale(1.1);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 768px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-content {
        flex-direction: column;
        align-items: stretch;
    }
    
    .cookie-buttons {
        justify-content: stretch;
    }
    
    .cookie-btn {
        flex: 1;
        text-align: center;
        padding: 0.8rem 1rem;
    }
    
    .cookie-modal-content {
        margin: 0.5rem;
    }
    
    .cookie-settings-btn {
        bottom: 15px;
        left: 15px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 480px) {
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .cookie-text h3 {
        font-size: 1rem;
    }
    
    .cookie-text p {
        font-size: 0.85rem;
    }
}

/* ============================================================
   ACCESIBILIDAD
   ============================================================ */

.cookie-toggle input:focus + label {
    outline: 2px solid var(--dorado, #FFC700);
    outline-offset: 2px;
}

.cookie-btn:focus,
.cookie-modal-close:focus,
.cookie-settings-btn:focus {
    outline: 2px solid var(--dorado, #FFC700);
    outline-offset: 2px;
}

/* Reducir movimiento para usuarios que lo prefieran */
@media (prefers-reduced-motion: reduce) {
    .cookie-banner,
    .cookie-modal,
    .cookie-modal-content,
    .cookie-settings-btn,
    .cookie-toggle label,
    .cookie-toggle label::after {
        transition: none;
    }
}
