/* Estilos para el sistema de gestión de cookies */

/* Banner de cookies */
.cookie-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(255, 255, 255, 0.95);
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 1.5rem;
    font-family: 'Poppins', sans-serif;
    transition: transform 0.3s ease-in-out;
    border-top: 1px solid #e5e7eb;
}

.cookie-banner.hidden {
    display: none;
}

.cookie-banner-content {
    max-width: 1200px;
    margin: 0 auto;
}

.cookie-banner-title {
    font-weight: 600;
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
    color: #1f2937;
}

.cookie-banner-text {
    margin-bottom: 1.5rem;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
}

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

/* Panel de configuración de cookies */
.cookie-settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

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

.cookie-settings-content {
    background-color: white;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    width: 100%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
}

.cookie-settings-title {
    font-weight: 600;
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #1f2937;
}

.cookie-settings-description {
    margin-bottom: 1.5rem;
    color: #4b5563;
    font-size: 0.95rem;
    line-height: 1.5;
}

.cookie-categories {
    margin-bottom: 1.5rem;
}

.cookie-category {
    border: 1px solid #e5e7eb;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
    overflow: hidden;
}

.cookie-category-header {
    padding: 1rem;
    background-color: #f9fafb;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
}

.cookie-category-title {
    font-weight: 600;
    color: #1f2937;
    display: flex;
    align-items: center;
}

.cookie-category-toggle {
    display: flex;
    align-items: center;
}

.cookie-category-description {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #4b5563;
    font-size: 0.9rem;
    line-height: 1.5;
}

.cookie-settings-buttons {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

/* Estilos para los botones */
.cookie-btn {
    padding: 0.625rem 1.25rem;
    border-radius: 0.375rem;
    font-weight: 500;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.cookie-btn-primary {
    background-color: #ea580c; /* orange-600 */
    color: white;
    border: none;
}

.cookie-btn-primary:hover {
    background-color: #c2410c; /* orange-700 */
}

.cookie-btn-secondary {
    background-color: white;
    color: #4b5563;
    border: 1px solid #d1d5db;
}

.cookie-btn-secondary:hover {
    background-color: #f9fafb;
    border-color: #9ca3af;
}

.cookie-btn-link {
    background: none;
    color: #ea580c;
    border: none;
    padding: 0.5rem;
    text-decoration: underline;
    cursor: pointer;
}

.cookie-btn-link:hover {
    color: #c2410c;
}

/* Toggle switch */
.switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 24px;
}

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

input:checked + .slider {
    background-color: #ea580c;
}

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

input:checked + .slider:before {
    transform: translateX(20px);
}

/* Estilos responsivos */
@media (max-width: 640px) {
    .cookie-banner {
        padding: 1rem;
    }
    
    .cookie-banner-buttons {
        flex-direction: column;
    }
    
    .cookie-settings-content {
        padding: 1.5rem;
    }
    
    .cookie-settings-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.cookie-banner, .cookie-settings-panel {
    animation: fadeIn 0.3s ease-out;
}
