/* ========================================= */
/* SISTEMA DE COOKIES FORTINIX v1.0 */
/* ========================================= */

/* Banner principal de cookies */
#cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(5, 10, 20, 0.98), rgba(12, 18, 32, 0.98));
    color: #F2F2F2;
    padding: 20px;
    z-index: 99999;
    border-top: 3px solid #009DFF;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    transform: translateY(100%);
    transition: transform 0.4s ease-in-out;
}

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

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

.cookie-content {
    flex: 1;
    min-width: 300px;
}

.cookie-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 8px;
    color: #009DFF;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cookie-text {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #A6AAB6;
    margin-bottom: 0;
}

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

.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 25px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    font-family: inherit;
}

.cookie-btn-accept {
    background: linear-gradient(135deg, #009DFF, #ED267A);
    color: white;
}

.cookie-btn-accept:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 157, 255, 0.3);
}

.cookie-btn-decline {
    background: transparent;
    color: #F2F2F2;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

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

.cookie-btn-settings {
    background: transparent;
    color: #009DFF;
    border: 1px solid #009DFF;
    font-size: 0.85rem;
}

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

/* Modal de configuración de cookies */
#cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#cookie-modal.show {
    display: flex;
}

.cookie-modal-content {
    background: linear-gradient(135deg, rgba(12, 18, 32, 0.98), rgba(5, 10, 20, 0.98));
    border-radius: 15px;
    padding: 30px;
    max-width: 600px;
    width: 100%;
    max-height: 80vh;
    overflow-y: auto;
    border: 1px solid rgba(0, 157, 255, 0.2);
    backdrop-filter: blur(15px);
}

.cookie-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.cookie-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: #009DFF;
    margin: 0;
}

.cookie-close {
    background: none;
    border: none;
    color: #A6AAB6;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.cookie-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ED267A;
}

.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

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

.cookie-category-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #F2F2F2;
    margin: 0;
}

.cookie-category-desc {
    font-size: 0.9rem;
    color: #A6AAB6;
    line-height: 1.5;
    margin: 0;
}

/* Toggle switch para cookies */
.cookie-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.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: #4A5568;
    transition: .4s;
    border-radius: 24px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, #009DFF, #ED267A);
}

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

.cookie-toggle.disabled .cookie-toggle-slider {
    background-color: #2D3748;
    cursor: not-allowed;
}

.cookie-modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Botón flotante de configuración de cookies */
#cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: linear-gradient(135deg, #009DFF, #ED267A);
    color: white;
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    cursor: pointer;
    z-index: 9998;
    box-shadow: 0 4px 15px rgba(0, 157, 255, 0.3);
    transition: all 0.3s ease;
    display: none;
}

#cookie-settings-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(0, 157, 255, 0.4);
}

#cookie-settings-btn.show {
    display: block;
}

/* Estilos para notificaciones */
.cookie-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 100001;
    font-family: inherit;
    font-weight: 600;
    max-width: 300px;
    word-wrap: break-word;
    color: white;
}

.cookie-notification.success {
    background: linear-gradient(135deg, #4CAF50, #45a049);
}

.cookie-notification.info {
    background: linear-gradient(135deg, #009DFF, #ED267A);
}

/* Animaciones */
@keyframes slideInFromRight {
    0% { transform: translateX(100%); opacity: 0; }
    100% { transform: translateX(0); opacity: 1; }
}

@keyframes slideOutToRight {
    0% { transform: translateX(0); opacity: 1; }
    100% { transform: translateX(100%); opacity: 0; }
}

/* Estilos responsive */
@media (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        align-items: stretch;
        gap: 15px;
    }

    .cookie-content {
        min-width: auto;
    }

    .cookie-actions {
        justify-content: center;
    }

    .cookie-btn {
        flex: 1;
        text-align: center;
        min-width: 120px;
    }

    .cookie-modal-content {
        margin: 10px;
        padding: 20px;
    }

    .cookie-modal-actions {
        flex-direction: column;
    }

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

    #cookie-settings-btn {
        bottom: 80px; /* Evitar solapamiento con menú móvil */
    }
}