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

/* Banner Principal */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #1A365D 0%, #2C5282 100%);
    color: white;
    padding: 25px 20px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
    z-index: 9999;
    display: block;
    transform: translateY(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-top: 3px solid #F7941D;
}

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

.cookie-banner.hide {
    transform: translateY(100%);
}

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

.cookie-icon {
    font-size: 3rem;
    flex-shrink: 0;
}

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

.cookie-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0 0 10px 0;
    color: white;
}

.cookie-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0 0 10px 0;
    color: rgba(255, 255, 255, 0.9);
}

.cookie-text a {
    color: #F7941D;
    text-decoration: underline;
    font-weight: 600;
}

.cookie-text a:hover {
    color: #FFA500;
}

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

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

.cookie-btn-accept {
    background: #F7941D;
    color: white;
}

.cookie-btn-accept:hover {
    background: #E58A1A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(247, 148, 29, 0.4);
}

.cookie-btn-config {
    background: transparent;
    color: white;
    border: 2px solid white;
}

.cookie-btn-config:hover {
    background: white;
    color: #2C5282;
}

.cookie-btn-reject {
    background: transparent;
    color: rgba(255, 255, 255, 0.8);
    border: 2px solid rgba(255, 255, 255, 0.5);
}

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

/* Modal de Configuración */
.cookie-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cookie-modal.show {
    display: flex;
    opacity: 1;
}

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

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.cookie-modal-header {
    background: linear-gradient(135deg, #2C5282 0%, #3182CE 100%);
    color: white;
    padding: 25px 30px;
    border-radius: 12px 12px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cookie-modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0;
}

.cookie-modal-close {
    background: transparent;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    padding: 0;
    width: 35px;
    height: 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

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

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

.cookie-intro {
    font-size: 0.95rem;
    line-height: 1.7;
    color: #4A5568;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px solid #E2E8F0;
}

.cookie-category {
    margin-bottom: 25px;
    padding: 20px;
    background: #F7FAFC;
    border-radius: 8px;
    border-left: 4px solid #2C5282;
    transition: all 0.3s ease;
}

.cookie-category:hover {
    background: #EDF2F7;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.cookie-category.required {
    border-left-color: #38A169;
    opacity: 0.9;
}

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

.cookie-category-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #2C5282;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-badge {
    font-size: 0.7rem;
    padding: 3px 10px;
    border-radius: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.cookie-badge-required {
    background: #38A169;
    color: white;
}

.cookie-badge-optional {
    background: #F7941D;
    color: white;
}

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

.cookie-category-examples {
    font-size: 0.85rem;
    color: #718096;
    margin-top: 8px;
    font-style: italic;
}

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

.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: #CBD5E0;
    transition: 0.3s;
    border-radius: 28px;
}

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

.cookie-toggle input:checked + .cookie-toggle-slider {
    background-color: #38A169;
}

.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-modal-footer {
    padding: 20px 30px;
    background: #F7FAFC;
    border-radius: 0 0 12px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

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

/* Responsive */
@media (max-width: 768px) {
    .cookie-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
    
    .cookie-icon {
        font-size: 2.5rem;
    }
    
    .cookie-actions {
        width: 100%;
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .cookie-modal-content {
        margin: 10px;
    }
    
    .cookie-modal-body {
        padding: 20px;
    }
    
    .cookie-modal-footer {
        flex-direction: column;
    }
    
    .cookie-modal-footer .cookie-btn {
        width: 100%;
    }
}

/* Animación de entrada */
@keyframes slideInUp {
    from {
        transform: translateY(100%);
    }
    to {
        transform: translateY(0);
    }
}

/* Indicador de cookies activas */
.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    background: #2C5282;
    color: white;
    border: none;
    border-radius: 50%;
    width: 55px;
    height: 55px;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 9998;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cookie-settings-btn:hover {
    background: #3182CE;
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.3);
}

.cookie-settings-btn.hidden {
    display: none;
}