/**
 * BORA HOTEL IQUITOS - Cookie Consent Styles
 * ==========================================
 * Banner de cookies CENTRADO en pantalla.
 * Z-index superior a SweetAlert2 para evitar conflictos.
 */

/* ==========================================================================
   Variables
   ========================================================================== */
   
:root {
    --cookie-primary: #C9A962;
    --cookie-primary-dark: #B8924D;
    --cookie-secondary: #111E19;
    --cookie-text: #333;
    --cookie-text-light: #666;
    --cookie-bg: #ffffff;
    --cookie-border: #e8e4da;
    --cookie-overlay: rgba(0, 0, 0, 0.8);
    --cookie-shadow: 0 10px 50px rgba(0, 0, 0, 0.3);
    --cookie-radius: 16px;
}

/* ==========================================================================
   Banner Container - CENTRADO, Z-INDEX MÁXIMO
   ========================================================================== */

.cookie-consent {
    position: fixed !important;
    top: -750px !important;
    left: 0px !important;
    right: 0px !important;
    bottom: 0px !important;
    z-index: 2147483647 !important; /* Máximo valor, superior a SweetAlert2 */
    display: flex; /* SIN !important para que JS pueda ocultarlo */
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

/* Overlay oscuro */
.cookie-overlay {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: var(--cookie-overlay) !important;
    z-index: -1 !important;
}

/* Caja del banner - CENTRADA */
.cookie-banner {
    position: relative !important;
    width: 100% !important;
    max-width: 480px !important;
    background: var(--cookie-bg) !important;
    border-radius: var(--cookie-radius) !important;
    box-shadow: var(--cookie-shadow) !important;
    overflow: hidden !important;
}

/* ==========================================================================
   Vista Principal
   ========================================================================== */

.cookie-main {
    padding: 28px;
}

.cookie-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 24px;
}

.cookie-icon {
    width: 56px;
    height: 56px;
    padding: 12px;
    background: linear-gradient(135deg, #faf8f5 0%, #f0ece3 100%);
    border-radius: 50%;
    color: var(--cookie-primary);
    margin-bottom: 16px;
}

.cookie-icon svg {
    width: 100%;
    height: 100%;
}

.cookie-text h3 {
    margin: 0 0 10px 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--cookie-secondary);
}

.cookie-text p {
    margin: 0;
    font-size: 0.9375rem;
    color: var(--cookie-text-light);
    line-height: 1.6;
}

/* ==========================================================================
   Botones
   ========================================================================== */

.cookie-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cookie-btn {
    display: block;
    width: 100%;
    padding: 14px 24px;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.cookie-btn:focus {
    outline: 2px solid var(--cookie-primary);
    outline-offset: 2px;
}

.cookie-btn--primary {
    background: linear-gradient(135deg, var(--cookie-primary) 0%, var(--cookie-primary-dark) 100%);
    color: #fff;
    box-shadow: 0 4px 15px rgba(201, 169, 98, 0.4);
}

.cookie-btn--primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(201, 169, 98, 0.5);
}

.cookie-btn--secondary {
    background: var(--cookie-secondary);
    color: #fff;
}

.cookie-btn--secondary:hover {
    background: #1a2f27;
}

.cookie-btn--outline {
    background: transparent;
    color: var(--cookie-text);
    border: 2px solid var(--cookie-border);
}

.cookie-btn--outline:hover {
    border-color: var(--cookie-primary);
    color: var(--cookie-primary);
}

/* ==========================================================================
   Vista Detallada (Preferencias)
   ========================================================================== */

.cookie-details {
    max-height: 70vh;
    overflow-y: auto;
}

.cookie-details-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--cookie-border);
    background: var(--cookie-bg);
    position: sticky;
    top: 0;
}

.cookie-details-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--cookie-secondary);
}

.cookie-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    padding: 0;
    background: #f5f5f5;
    border: none;
    border-radius: 50%;
    color: var(--cookie-text);
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-close:hover {
    background: #e0e0e0;
}

.cookie-close svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   Categorías de Cookies
   ========================================================================== */

.cookie-categories {
    padding: 8px 24px;
}

.cookie-category {
    padding: 16px 0;
    border-bottom: 1px solid var(--cookie-border);
}

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

.cookie-category-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.cookie-category-info {
    flex: 1;
}

.cookie-category-info h4 {
    margin: 0 0 4px 0;
    font-size: 1rem;
    font-weight: 600;
    color: var(--cookie-secondary);
}

.cookie-category-info p {
    margin: 0;
    font-size: 0.875rem;
    color: var(--cookie-text-light);
    line-height: 1.5;
}

/* ==========================================================================
   Toggle Switch
   ========================================================================== */

.cookie-toggle {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
}

.cookie-toggle input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cookie-toggle-slider {
    position: relative;
    display: inline-block;
    width: 52px;
    height: 28px;
    background: #ddd;
    border-radius: 28px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.cookie-toggle-slider::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 22px;
    height: 22px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.cookie-toggle input:checked + .cookie-toggle-slider {
    background: linear-gradient(135deg, var(--cookie-primary) 0%, var(--cookie-primary-dark) 100%);
}

.cookie-toggle input:checked + .cookie-toggle-slider::after {
    transform: translateX(24px);
}

.cookie-toggle--disabled {
    cursor: default;
}

.cookie-toggle-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--cookie-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ==========================================================================
   Footer de Detalles
   ========================================================================== */

.cookie-details-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    border-top: 1px solid var(--cookie-border);
    background: #faf9f7;
    position: sticky;
    bottom: 0;
}

.cookie-link {
    font-size: 0.875rem;
    color: var(--cookie-text-light);
    text-decoration: underline;
}

.cookie-link:hover {
    color: var(--cookie-primary);
}

/* ==========================================================================
   Botón Flotante de Configuración
   ========================================================================== */

.cookie-settings-btn {
    position: fixed;
    bottom: 20px;
    left: 20px;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: var(--cookie-bg);
    border: 2px solid var(--cookie-border);
    border-radius: 50%;
    color: var(--cookie-primary);
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    transition: all 0.2s ease;
}

.cookie-settings-btn:hover {
    border-color: var(--cookie-primary);
    transform: scale(1.1);
}

.cookie-settings-btn svg {
    width: 22px;
    height: 22px;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 540px) {
    .cookie-consent {
        padding: 16px !important;
    }
    
    .cookie-banner {
        max-width: 100% !important;
    }
    
    .cookie-main {
        padding: 24px 20px;
    }
    
    .cookie-text h3 {
        font-size: 1.125rem;
    }
    
    .cookie-text p {
        font-size: 0.875rem;
    }
    
    .cookie-details-header,
    .cookie-categories,
    .cookie-details-footer {
        padding-left: 20px;
        padding-right: 20px;
    }
    
    .cookie-category-header {
        flex-direction: column;
        gap: 12px;
    }
    
    .cookie-details-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .cookie-details-footer .cookie-btn {
        width: 100%;
    }
}

/* ==========================================================================
   Ocultar en impresión
   ========================================================================== */

@media print {
    .cookie-consent,
    .cookie-settings-btn {
        display: none !important;
    }
}
