/* =========================================================
   Loliando - cookies.css
   Estilos para Banner de Cookies, Modal de Configuración y Página de Privacidad
   ========================================================= */

/* --- Variables locales para el módulo de cookies --- */
:root {
  --cookie-bg: rgba(255, 255, 255, 0.95);
  --cookie-text: #333;
  --cookie-toggle-on: #4CAF50;
  --cookie-toggle-off: #ccc;
  --cookie-banner-shadow: 0 -4px 20px rgba(0,0,0,0.1);
}

/* =========================================================
   COOKIE BANNER (Floating Bottom)
   ========================================================= */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--cookie-bg);
    border-top: 1px solid rgba(0,0,0,0.05);
    box-shadow: var(--cookie-banner-shadow);
    padding: 20px;
    z-index: 99999; /* Máxima prioridad */
    display: none; /* Se activa vía JS */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideUp 0.4s ease-out;
}

#cookie-consent-banner.visible {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

@media (min-width: 768px) {
    #cookie-consent-banner.visible {
        flex-direction: row;
        justify-content: space-between;
        padding: 20px 40px;
    }
}

.cookie-text-container {
    max-width: 800px;
}

.cookie-text-container p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--cookie-text);
    line-height: 1.5;
}

.cookie-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.btn-cookie-accept {
    background-color: var(--brand-green);
    color: #ffffff;
    padding: 10px 24px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cookie-accept:hover {
    background-color: var(--brand-green-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.btn-cookie-config {
    background-color: transparent;
    color: var(--brand-green);
    border: 2px solid var(--brand-green);
    padding: 8px 20px;
    border-radius: 20px;
    font-weight: 500;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.btn-cookie-config:hover {
    background-color: rgba(76, 175, 80, 0.05);
}

/* =========================================================
   COOKIE SETTINGS MODAL
   ========================================================= */
.cookie-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 100000;
    display: none;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    opacity: 0;
    transition: opacity 0.3s ease;
}

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

.cookie-modal {
    background: #fff;
    width: 90%;
    max-width: 600px;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    overflow: hidden;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    animation: zoomIn 0.3s ease-out;
}

.cookie-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #fcfcfc;
}

.cookie-modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.25rem;
    font-weight: 600;
}

.btn-close-modal {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
}

.cookie-modal-body {
    padding: 24px;
    overflow-y: auto;
}

.cookie-description {
    color: #666;
    margin-bottom: 24px;
    font-size: 0.95rem;
}

/* Toggles & Items */
.cookie-option {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 0;
    border-bottom: 1px solid #f0f0f0;
}

.cookie-option:last-child {
    border-bottom: none;
}

.option-info h4 {
    margin: 0 0 4px;
    font-size: 1rem;
    color: #333;
}

.option-info p {
    margin: 0;
    font-size: 0.85rem;
    color: #777;
    line-height: 1.4;
}

/* Toggle Switch CSS */
.toggle-switch {
    position: relative;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
    margin-left: 15px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--cookie-toggle-off);
    transition: .4s;
    border-radius: 34px;
}

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

input:checked + .slider {
    background-color: var(--cookie-toggle-on);
}

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

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

.cookie-modal-footer {
    padding: 20px 24px;
    border-top: 1px solid #eee;
    background: #fcfcfc;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.btn-cookie-save {
    background-color: var(--brand-green);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    width: 100%;
}

@media (min-width: 600px) {
    .cookie-modal-footer {
        flex-direction: row;
    }
    .btn-cookie-save {
        width: auto;
    }
}

/* =========================================================
   PRIVACY PAGE (privacidad.html)
   ========================================================= */
.privacy-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 40px 20px 100px; /* espaciado footer */
}

.privacy-hero {
    text-align: center;
    margin-bottom: 50px;
}

.privacy-hero h1 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: #333;
}

.privacy-hero p {
    font-size: 1.1rem;
    color: #666;
    max-width: 600px;
    margin: 0 auto;
}

.privacy-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    margin-bottom: 30px;
}

.privacy-card h2 {
    font-size: 1.5rem;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--brand-green);
}

.cookie-explanation {
    margin-top: 30px;
    display: grid;
    gap: 30px;
}

.cookie-type-item {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.cookie-icon {
    width: 50px;
    height: 50px;
    background: rgba(76, 175, 80, 0.1);
    color: var(--brand-green);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    flex-shrink: 0;
}

.cookie-text h4 {
    margin: 0 0 8px;
    font-size: 1.1rem;
    color: #333;
}

.cookie-text p {
    margin: 0;
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.action-area {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    text-align: center;
}

.action-area .note {
    margin-bottom: 20px;
    font-style: italic;
    color: #888;
}

/* Animations */
@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}
