/* Cookie Consent Banner Styles - MEJORADO */
#cookie-consent-banner {
    position: fixed;
    bottom: 0;
    right: 0;
    width: 600px;
    height: 300px;
    background: linear-gradient(135deg, #1a3c6d 0%, #0a1a3b 100%);
    color: #e6ecf5;
    padding: 25px;
    box-shadow: -5px 0 25px rgba(0, 0, 0, 0.4);
    z-index: 100;
    border-left: 3px solid #00aaff;
    border-top-left-radius: 12px;
    animation: slideInRight 0.5s ease-out;
    overflow-y: auto;
}

/* Animación que viene desde la derecha */
@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.cookie-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 100%;
}

.cookie-text {
    flex: 1;
}

.cookie-text h3 {
    font-size: 1.3rem;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.cookie-text p {
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

.cookie-buttons {
    display: flex;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ESTILOS ORIGINALES DE LOS BOTONES */
.cookie-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 0.95rem;
    min-width: 120px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.cookie-accept {
    background: linear-gradient(135deg, #00aaff 0%, #0088cc 100%);
    color: white;
}

.cookie-accept:hover {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.4);
}

.cookie-settings {
    background: rgba(255, 255, 255, 0.1);
    color: #e6ecf5;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-settings:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.cookie-reject {
    background: rgba(255, 255, 255, 0.05);
    color: #e6ecf5;
    border: 2px solid rgba(255, 255, 255, 0.2);
}

.cookie-reject:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.4);
    transform: translateY(-2px);
}

/* Cookie Settings Panel */
.cookie-settings-panel {
    height: 100%;
    animation: fadeIn 0.4s ease-out;
}

.settings-content {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 20px;
    border: 1px solid rgba(0, 170, 255, 0.3);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.settings-content h3 {
    color: #00aaff;
    margin-bottom: 20px;
    font-size: 1.3rem;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.settings-content h3::before {
    content: "⚙️";
    font-size: 1.2em;
}

.cookie-options {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 18px;
    margin-bottom: 25px;
}

.cookie-option {
    display: flex;
    flex-direction: column;
    padding: 18px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    border: 1px solid rgba(0, 170, 255, 0.2);
    transition: all 0.3s ease;
}

.cookie-option:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(0, 170, 255, 0.4);
    transform: translateY(-2px);
}

.option-header {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.cookie-option input[type="checkbox"] {
    margin-right: 12px;
    transform: scale(1.2);
    accent-color: #00aaff;
}

.cookie-option span {
    font-weight: 600;
    color: #e6ecf5;
    font-size: 1.05rem;
}

.cookie-option small {
    color: #b8c7e6;
    font-size: 0.9rem;
    margin-left: 30px;
    line-height: 1.4;
}

.cookie-option input[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-buttons {
    display: flex;
    justify-content: center;
    gap: 15px;
}

/* ESTILOS ORIGINALES DE LOS BOTONES DE CONFIGURACIÓN */
.settings-save {
    background: linear-gradient(135deg, #00aaff 0%, #0088cc 100%);
    color: white;
    padding: 12px 30px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 170, 255, 0.3);
}

.settings-save:hover {
    background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 170, 255, 0.5);
}

.settings-cancel {
    background: rgba(255, 255, 255, 0.1);
    color: #e6ecf5;
    padding: 12px 30px;
    border-radius: 8px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.settings-cancel:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

/* Responsive para móviles */
@media (max-width: 768px) {
    #cookie-consent-banner {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        width: auto;
        height: auto;
        max-height: 70vh;
        border-radius: 0;
        border-left: none;
        border-top: 3px solid #00aaff;
        animation: slideUp 0.5s ease-out;
    }
    
    .cookie-content {
        flex-direction: column;
        text-align: center;
    }
    
    .cookie-buttons {
        flex-direction: column;
    }
    
    .cookie-btn {
        width: 100%;
    }
    
    .settings-buttons {
        flex-direction: column;
    }
    
    .settings-save, .settings-cancel {
        width: 100%;
    }
}

@media (max-width: 480px) {
    #cookie-consent-banner {
        padding: 20px 15px;
    }
    
    .cookie-text h3 {
        font-size: 1.1rem;
    }
    
    .cookie-text p {
        font-size: 0.9rem;
    }
    
    .cookie-option {
        padding: 15px;
    }
    
    .option-header {
        flex-wrap: wrap;
    }
}
/* WhatsApp Floating Button */
.whatsapp-floating {
    position: fixed;
    top: 120px;
    right: 70px;
    z-index: 1000;
}

.whatsapp-btn {
    width: 60px;
    height: 60px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    transition: all 0.3s ease;
    animation: pulse 2s infinite;
    position: relative;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.6);
}

.whatsapp-btn:hover .whatsapp-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-10px);
}

/* Tooltip */
.whatsapp-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%) translateX(-20px);
    background: #000000;
    color: white;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1003;
    pointer-events: none;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 100%;
    transform: translateY(-50%);
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent transparent #000000;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* WhatsApp Chat Window */
.whatsapp-chat {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 10px;
    width: 320px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    display: none;
    animation: slideDown 0.3s ease;
    z-index: 1001;
}

.whatsapp-chat.active {
    display: block;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.chat-header {
    background: #25D366;
    color: white;
    padding: 15px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
}

.close-chat {
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
    padding: 0;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-chat:hover {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.chat-body {
    padding: 15px;
}

#whatsappMessage {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: vertical;
    font-family: 'Inter', sans-serif;
    font-size: 14px;
    margin-bottom: 12px;
    color: #333;
}

#whatsappMessage:focus {
    outline: none;
    border-color: #25D366;
    box-shadow: 0 0 0 2px rgba(37, 211, 102, 0.2);
}

.whatsapp-send-btn {
    width: 100%;
    padding: 12px;
    background: #25D366;
    color: white;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.whatsapp-send-btn:hover {
    background: #128C7E;
    transform: translateY(-2px);
}

/* Responsive - CORREGIDO */
/* Móvil vertical (portrait) */
@media (max-width: 768px) and (orientation: portrait) {
    .whatsapp-floating {
        top: 90px; /* Posición en la parte superior derecha */
        bottom: auto;
        right: 15px;
    }
    
    .whatsapp-chat {
        top: 100%; /* El chat se abre hacia abajo */
        bottom: auto;
        right: 0;
        width: 280px;
        margin-top: 10px;
    }
    
    /* Tooltip para móvil vertical */
    .whatsapp-tooltip {
        right: 70px;
        top: -50px;
        transform: translateY(0) translateX(-20px);
        white-space: normal;
        width: 180px;
        text-align: center;
    }
    
    .whatsapp-tooltip::after {
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-color: #000000 transparent transparent transparent;
    }
    
    .whatsapp-btn.tooltip-active .whatsapp-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-10px);
    }
}

/* Móvil horizontal (landscape) */
@media (max-width: 768px) and (orientation: landscape) {
    .whatsapp-floating {
        top: auto;
        bottom: 90px; /* Posición en la parte inferior derecha */
        right: 15px;
    }
    
    .whatsapp-chat {
        top: auto;
        bottom: 70px; /* El chat se abre hacia arriba */
        right: 0;
        width: 280px;
        margin-top: 0;
        margin-bottom: 10px;
    }
    
    /* Tooltip para móvil horizontal */
    .whatsapp-tooltip {
        right: 70px;
        top: -50px;
        transform: translateY(0) translateX(-20px);
        white-space: normal;
        width: 180px;
        text-align: center;
    }
    
    .whatsapp-tooltip::after {
        top: 100%;
        left: 50%;
        transform: translateX(-50%);
        border-color: #000000 transparent transparent transparent;
    }
    
    .whatsapp-btn.tooltip-active .whatsapp-tooltip {
        opacity: 1;
        visibility: visible;
        transform: translateX(-10px);
    }
}

/* Ajustes para móviles muy pequeños */
@media (max-width: 480px) {
    /* Para portrait */
    @media (orientation: portrait) {
        .whatsapp-floating {
            top: 80px;
            right: 10px;
        }
        
        .whatsapp-chat {
            width: 260px;
            right: -10px;
        }
    }
    
    /* Para landscape */
    @media (orientation: landscape) {
        .whatsapp-floating {
            bottom: 80px;
            right: 10px;
        }
        
        .whatsapp-chat {
            width: 260px;
            right: -10px;
        }
    }
    
    .whatsapp-btn {
        width: 55px;
        height: 55px;
        font-size: 24px;
    }
}