/* ===== ESTILOS PARA SISTEMA DE COOKIES ===== */

/* Variables CSS con tu paleta */
:root {
    --primary-color: #015e31;
    --secondary-color: #0038a8;
    --accent-color: #ffcc00;
   --success-color: #02743c;
    --danger-color: #cb0000;
    --text-light: #fdf6f3;
    --text-dark: #333;
    --gray-light: #f8f9fa;
    --gray-medium: #6c757d;
    --shadow: 0 4px 15px rgba(0,0,0,0.1);
    --border-radius: 12px;
}

/* Banner de Cookies */
.cookies-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0,0,0,0.2);
    z-index: 10000;
    border-left: 4px solid var(--primary-color);
    animation: slideUp 0.5s ease;
    max-width: 500px;
}

.cookies-content {
    padding: 20px;
}

.cookies-text h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookies-text h3 i {
    color: var(--secondary-color);
}

.cookies-text p {
    color: var(--text-dark);
    line-height: 1.5;
    margin-bottom: 15px;
}

.cookies-text a {
    color: var(--accent-color);
    text-decoration: none;
}

.cookies-text a:hover {
    text-decoration: underline;
}

.cookies-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.cookies-btn {
    padding: 10px 20px;
    border: none;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
}

.cookies-btn-primary {
    background: linear-gradient(135deg, var(--primary-color), #d44a0c);
    color: white;
}

.cookies-btn-primary:hover {
    background: linear-gradient(135deg, #d44a0c, var(--primary-color));
    transform: translateY(-2px);
}

.cookies-btn-secondary {
    background: var(--gray-medium);
    color: white;
}

.cookies-btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.cookies-btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.cookies-btn-outline:hover {
    background: var(--primary-color);
    color: white;
}

/* Panel de Preferencias */
.cookies-preferences {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10001;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}

.cookies-pref-content {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 600px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    animation: scaleIn 0.3s ease;
}

.cookies-pref-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    border-bottom: 1px solid #e0e0e0;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: white;
    border-radius: var(--border-radius) var(--border-radius) 0 0;
}

.cookies-pref-header h3 {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 10px;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 5px;
    transition: transform 0.3s ease;
}

.close-btn:hover {
    transform: scale(1.2);
}

.cookies-pref-body {
    padding: 20px;
}

.cookie-category {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.cookie-category:hover {
    border-color: var(--primary-color);
    box-shadow: var(--shadow);
}

.category-header {
    display: flex;
    align-items: flex-start;
    gap: 15px;
}

.category-info h4 {
    margin: 0 0 5px 0;
    color: var(--text-dark);
}

.category-info p {
    margin: 0;
    color: var(--gray-medium);
    font-size: 0.9rem;
    line-height: 1.4;
}

.cookies-pref-footer {
    padding: 20px;
    border-top: 1px solid #e0e0e0;
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Switch de Cookies */
.cookie-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
    flex-shrink: 0;
}

.cookie-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: .4s;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
}

input:checked + .slider {
    background-color: var(--success-color);
}

input:focus + .slider {
    box-shadow: 0 0 1px var(--success-color);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.slider.round {
    border-radius: 24px;
}

.slider.round:before {
    border-radius: 50%;
}

input:disabled + .slider {
    background-color: var(--primary-color);
    cursor: not-allowed;
}

/* Animaciones */
@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes scaleIn {
    from {
        transform: scale(0.9);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 768px) {
    .cookies-banner {
        left: 10px;
        right: 10px;
        bottom: 10px;
    }
    
    .cookies-actions {
        flex-direction: column;
    }
    
    .cookies-btn {
        justify-content: center;
    }
    
    .cookies-pref-content {
        margin: 10px;
    }
    
    .cookies-pref-footer {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .cookies-content {
        padding: 15px;
    }
    
    .cookies-pref-body {
        padding: 15px;
    }
    
    .category-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .cookie-switch {
        align-self: flex-start;
    }
}