/* =============================================
   DOPSEN CAFÉ - WhatsApp Enhanced Styles
   ============================================= */

/* Floating WhatsApp Button - Mejorado */
.whatsapp-float {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
    animation: pulse-whatsapp 2s infinite;
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 211, 102, 0.6);
}

.whatsapp-float:active {
    transform: scale(0.95);
}

/* Floating Google Maps Button (mismo lado, mismo tamaño) */
.maps-float {
    position: fixed;
    bottom: 95px;
    right: 25px;
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, #4285F4 0%, #1a73e8 100%);
    color: white;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: 0 4px 20px rgba(66, 133, 244, 0.35);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    text-decoration: none;
}

.maps-float svg {
    width: 32px;
    height: 32px;
    fill: white;
}

.maps-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(66, 133, 244, 0.55);
}

.maps-float:active {
    transform: scale(0.95);
}

/* Tooltip mejorado */
.whatsapp-float-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: white;
    color: #2D1810;
    padding: 0.75rem 1.25rem;
    border-radius: 30px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    font-size: 0.875rem;
    font-weight: 500;
}

.whatsapp-float-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid white;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.whatsapp-float:hover .whatsapp-float-tooltip {
    opacity: 1;
    right: 75px;
}

/* Animación de pulso */
@keyframes pulse-whatsapp {
    0% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }

    50% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4),
            0 0 0 10px rgba(37, 211, 102, 0.1),
            0 0 0 20px rgba(37, 211, 102, 0.05);
    }

    100% {
        box-shadow: 0 4px 20px rgba(37, 211, 102, 0.4);
    }
}

/* Badge de notificación */
.whatsapp-float .badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #FF5252;
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid var(--color-background);
}

/* Botón de WhatsApp en productos */
.btn-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    border: none;
    border-radius: 30px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp svg {
    width: 20px;
    height: 20px;
    fill: white;
}

.btn-whatsapp:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 211, 102, 0.5);
}

.btn-whatsapp:active {
    transform: translateY(0);
}

/* WhatsApp widget expandible */
.whatsapp-widget {
    position: fixed;
    bottom: 100px;
    right: 25px;
    width: 340px;
    max-height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.3);
    z-index: 999;
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
    transition: all 0.3s ease;
    overflow: hidden;
}

.whatsapp-widget.active {
    opacity: 1;
    transform: translateY(0);
    pointer-events: all;
}

.whatsapp-widget-header {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    color: white;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.whatsapp-widget-header img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid white;
}

.whatsapp-widget-info h4 {
    margin: 0;
    font-size: 1rem;
}

.whatsapp-widget-info p {
    margin: 0;
    font-size: 0.875rem;
    opacity: 0.9;
}

.whatsapp-widget-body {
    padding: 1.5rem;
    background: #ECE5DD;
}

.whatsapp-message {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    position: relative;
}

.whatsapp-message::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 12px;
    width: 0;
    height: 0;
    border-right: 8px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.whatsapp-message p {
    margin: 0;
    color: #2D1810;
    font-size: 0.875rem;
    line-height: 1.5;
}

.whatsapp-widget-footer {
    padding: 1rem 1.5rem;
    background: white;
    border-top: 1px solid #ddd;
}

.whatsapp-widget-footer .btn-whatsapp {
    width: 100%;
    justify-content: center;
}

/* Responsive */
@media (max-width: 768px) {
    .whatsapp-widget {
        width: calc(100% - 50px);
        right: 25px;
        left: 25px;
    }

    .whatsapp-float-tooltip {
        display: none;
    }
}

/* Quick Actions - Enlaces rápidos de WhatsApp */
.whatsapp-quick-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin: 1rem 0;
}

.whatsapp-quick-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
    border: 2px solid #25D366;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.whatsapp-quick-link svg {
    width: 16px;
    height: 16px;
    fill: #25D366;
}

.whatsapp-quick-link:hover {
    background: #25D366;
    color: white;
}

.whatsapp-quick-link:hover svg {
    fill: white;
}

/* Botón de contacto en el header */
.header-whatsapp {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(37, 211, 102, 0.1);
    color: #25D366;
    border: 2px solid #25D366;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.875rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.header-whatsapp svg {
    width: 18px;
    height: 18px;
    fill: #25D366;
}

.header-whatsapp:hover {
    background: #25D366;
    color: white;
}

.header-whatsapp:hover svg {
    fill: white;
}

/* Estilo para el modal de checkout con WhatsApp mejorado */
.checkout-whatsapp-section {
    background: linear-gradient(135deg, rgba(37, 211, 102, 0.1) 0%, rgba(18, 140, 126, 0.1) 100%);
    border: 2px solid #25D366;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 1.5rem;
}

.checkout-whatsapp-section h4 {
    color: #25D366;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.checkout-whatsapp-section h4 svg {
    width: 24px;
    height: 24px;
    fill: #25D366;
}

/* Animación de "escribiendo..." */
.whatsapp-typing {
    display: flex;
    gap: 4px;
    padding: 0.75rem 1rem;
}

.whatsapp-typing span {
    width: 8px;
    height: 8px;
    background: #25D366;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

.whatsapp-typing span:nth-child(2) {
    animation-delay: 0.2s;
}

.whatsapp-typing span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes typing {

    0%,
    60%,
    100% {
        transform: translateY(0);
        opacity: 0.5;
    }

    30% {
        transform: translateY(-10px);
        opacity: 1;
    }
}