:root {
    color-scheme: light dark;
    --header-height: 82px;
}

body {
    position: relative;
    min-height: max(884px, 100dvh);
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.material-symbols-outlined.filled {
    font-variation-settings: 'FILL' 1;
}

.floating-whatsapp-wrapper {
    position: fixed;
    bottom: 1.25rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.5rem;
    z-index: 8000;
    pointer-events: none;
}

.floating-whatsapp-bubble {
    display: none;
    background: rgba(34, 16, 25, 0.92);
    color: #fcf8fa;
    padding: 0.65rem 1rem;
    border-radius: 9999px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.35);
    opacity: 1;
    transform: none;
    animation: none;
    pointer-events: none;
    white-space: nowrap;
}

.floating-whatsapp {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 9999px;
    background: linear-gradient(135deg, #25d366, #128c7e);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
    transition: transform 150ms ease, box-shadow 150ms ease;
    pointer-events: auto;
}

.floating-whatsapp:hover,
.floating-whatsapp:focus-visible {
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.35);
}

.floating-whatsapp svg {
    width: 1.8rem;
    height: 1.8rem;
}

@keyframes whatsappBubbleCycle {
    0% {
        opacity: 0;
        transform: translateY(10px);
        visibility: hidden;
    }
    70% {
        opacity: 0;
        transform: translateY(10px);
        visibility: hidden;
    }
    74% {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
    86% {
        opacity: 1;
        transform: translateY(0);
        visibility: visible;
    }
    90%,
    100% {
        opacity: 0;
        transform: translateY(10px);
        visibility: hidden;
    }
}

@media (prefers-reduced-motion: reduce) {
    .floating-whatsapp-bubble {
        animation: none;
        opacity: 0;
    }

    .floating-whatsapp,
    .floating-whatsapp:hover,
    .floating-whatsapp:focus-visible {
        transition: none;
        transform: none;
    }
}

details summary::-webkit-details-marker {
    display: none;
}

details[open] summary span {
    transform: rotate(180deg);
}

.sticky-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
}

.has-fixed-header {
    padding-top: var(--header-height);
}

@media (min-width: 768px) {
    body:not(.allow-desktop) {
        overflow: hidden;
    }

    body:not(.allow-desktop)::before {
        content: "Este sitio está optimizado para visualizarse en dispositivos móviles. Por favor abre Medicants desde tu teléfono.";
        position: fixed;
        inset: 0;
        background: #221019;
        color: #fcf8fa;
        display: flex;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding: 2rem;
        font-size: 1.125rem;
        font-weight: 600;
        line-height: 1.5;
        z-index: 9999;
    }

    body:not(.allow-desktop) .floating-whatsapp-wrapper {
        display: none;
    }
}
