/* 
    Cookies Banner - RGPD Compliant 2024
    Diseño premium integrado con el sistema de diseño del sitio
*/

#cookie-banner {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    background: var(--color-white, #ffffff);
    color: var(--color-text, #2C3322);
    padding: 25px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    z-index: 10000;
    border-radius: 12px;
    display: none; /* Se activa por JS */
    font-family: var(--font-sans, sans-serif);
    max-width: 1160px;
    margin: 0 auto;
    border: 1px solid var(--color-secondary, #E5E0D5);
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.cookie-text h3 {
    font-family: var(--font-serif, serif);
    font-size: 1.5rem;
    margin-bottom: 10px;
    color: var(--color-primary, #1B2D2A);
}

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

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

.cookie-btn {
    padding: 12px 24px;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-size: 0.9rem;
}

.cookie-btn-accept {
    background-color: var(--color-cta, #BC6C25);
    color: white;
}

.cookie-btn-accept:hover {
    background-color: var(--color-cta-hover, #9E521E);
    transform: translateY(-2px);
}

.cookie-btn-reject {
    background-color: var(--color-primary, #1B2D2A);
    color: white;
}

.cookie-btn-reject:hover {
    background-color: #000;
    transform: translateY(-2px);
}

.cookie-btn-settings {
    background: none;
    color: var(--color-text);
    text-decoration: underline;
    padding: 0;
}

/* Modal de Configuración */
#cookie-settings-modal {
    display: none;
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.6);
    z-index: 10001;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.settings-container {
    background: white;
    padding: 30px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

.settings-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.settings-header h4 {
    font-family: var(--font-serif);
    font-size: 1.8rem;
    margin: 0;
}

.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #eee;
}

.option-info h5 {
    margin: 0 0 5px 0;
    font-size: 1rem;
}

.option-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #666;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    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: .4s;
    border-radius: 34px;
}

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

input:checked + .slider { background-color: var(--color-cta); }
input:focus + .slider { box-shadow: 0 0 1px var(--color-cta); }
input:checked + .slider:before { transform: translateX(26px); }
input:disabled + .slider { background-color: #ddd; cursor: not-allowed; }

.save-settings {
    margin-top: 30px;
    width: 100%;
}

@media (min-width: 768px) {
    .cookie-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
    }
    .cookie-text {
        max-width: 60%;
    }
}
