/* Autos Esquivel V2 — utilidades flotantes de contacto en escritorio. */

.ae-floating-whatsapp {
    --ae-wa-green: #25d366;
    --ae-wa-green-dark: #1fbd59;
    --ae-wa-bubble-bg: rgba(12, 14, 16, .96);
    --ae-wa-bubble-text: #ffffff;
    --ae-wa-bubble-muted: rgba(255, 255, 255, .70);
    --ae-wa-bubble-line: rgba(255, 255, 255, .12);
    position: fixed;
    z-index: 980;
    right: max(18px, env(safe-area-inset-right));
    bottom: max(20px, calc(env(safe-area-inset-bottom) + 16px));
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 10px;
    font-family: "Manrope", "Avenir Next", "Segoe UI Variable", "Segoe UI", Inter, ui-sans-serif, system-ui, sans-serif;
    pointer-events: none;
}

html[data-theme="light"] .ae-floating-whatsapp {
    --ae-wa-bubble-bg: rgba(255, 255, 255, .98);
    --ae-wa-bubble-text: #111315;
    --ae-wa-bubble-muted: #646a70;
    --ae-wa-bubble-line: rgba(17, 19, 21, .10);
}

.ae-floating-whatsapp *,
.ae-floating-whatsapp *::before,
.ae-floating-whatsapp *::after {
    box-sizing: border-box;
}

.ae-floating-whatsapp__link {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    color: inherit;
    text-decoration: none;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
}

html body.public-site-rebuild .ae-floating-whatsapp .ae-floating-alert {
    position: relative;
    width: 54px;
    height: 54px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .42);
    border-radius: 999px !important;
    background: #8c7a6b;
    box-shadow: 0 11px 28px rgba(79, 63, 51, .28);
    color: #171311;
    cursor: pointer;
    font: inherit;
    pointer-events: auto;
    -webkit-tap-highlight-color: transparent;
    transition: transform .2s ease, border-color .2s ease, background-color .2s ease, box-shadow .2s ease;
}

.ae-floating-alert__icon {
    width: 100%;
    height: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
}

.ae-floating-alert__icon svg {
    width: 22px;
    height: 22px;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.8;
}

.ae-floating-alert__copy {
    display: none;
}

.ae-floating-alert__copy strong,
.ae-floating-alert__copy small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ae-floating-alert__copy strong {
    color: currentColor;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -.01em;
}

.ae-floating-alert__copy small {
    color: rgba(255, 255, 255, .68);
    font-size: 9px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: .025em;
}

.ae-floating-alert__arrow {
    display: none;
}

.ae-floating-alert::after {
    position: absolute;
    top: 50%;
    right: calc(100% + 12px);
    width: max-content;
    max-width: min(210px, calc(100vw - 116px));
    padding: 9px 12px;
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 10px;
    background: rgba(23, 19, 17, .96);
    box-shadow: 0 10px 26px rgba(0, 0, 0, .20);
    color: #fff;
    content: "Recibe alertas";
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .01em;
    line-height: 1;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(8px, -50%, 0);
    transition: opacity .2s ease, transform .2s cubic-bezier(.2, .72, .18, 1);
}

.ae-floating-alert:hover,
.ae-floating-alert:focus-visible {
    border-color: #fff;
    background: #a69283;
    box-shadow: 0 15px 32px rgba(79, 63, 51, .36);
    transform: translateY(-2px) scale(1.035);
}

.ae-floating-alert:hover::after,
.ae-floating-alert:focus-visible::after {
    opacity: 1;
    transform: translate3d(0, -50%, 0);
}

.ae-floating-alert:focus-visible {
    outline: 3px solid rgba(140, 122, 107, .42);
    outline-offset: 3px;
}

html[data-theme="light"] .ae-floating-alert {
    border-color: rgba(255, 255, 255, .76);
    background: #8c7a6b;
    box-shadow: 0 11px 28px rgba(79, 63, 51, .24);
    color: #171311;
}

html[data-theme="light"] .ae-floating-alert::after {
    border-color: rgba(23, 19, 17, .13);
    background: #fff;
    color: #171311;
}

html[data-theme="light"] .ae-floating-alert:hover,
html[data-theme="light"] .ae-floating-alert:focus-visible {
    background: #a69283;
    box-shadow: 0 15px 32px rgba(79, 63, 51, .32);
}

.ae-floating-whatsapp__bubble {
    position: relative;
    min-width: 154px;
    max-width: min(250px, calc(100vw - 104px));
    display: grid;
    gap: 3px;
    padding: 11px 14px 12px;
    border: 1px solid var(--ae-wa-bubble-line);
    border-radius: 16px;
    background: var(--ae-wa-bubble-bg);
    box-shadow: 0 14px 38px rgba(0, 0, 0, .22);
    color: var(--ae-wa-bubble-text);
    backdrop-filter: blur(15px) saturate(120%);
    -webkit-backdrop-filter: blur(15px) saturate(120%);
    transform-origin: right center;
    animation: ae-wa-bubble-in .42s cubic-bezier(.2, .8, .2, 1) both;
}

.ae-floating-whatsapp__bubble::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -6px;
    width: 11px;
    height: 11px;
    border-top: 1px solid var(--ae-wa-bubble-line);
    border-right: 1px solid var(--ae-wa-bubble-line);
    background: var(--ae-wa-bubble-bg);
    transform: translateY(-50%) rotate(45deg);
}

.ae-floating-whatsapp__bubble strong {
    display: block;
    overflow: hidden;
    color: var(--ae-wa-bubble-text);
    font-size: 13px;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.015em;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ae-floating-whatsapp__bubble > span {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ae-wa-bubble-muted);
    font-size: 10px;
    font-weight: 650;
    line-height: 1.3;
    letter-spacing: .005em;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
}

.ae-floating-whatsapp__button {
    position: relative;
    width: 62px;
    height: 62px;
    flex: 0 0 62px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    border: 1px solid rgba(255, 255, 255, .30);
    border-radius: 999px;
    background: linear-gradient(145deg, #2be26f, var(--ae-wa-green-dark));
    box-shadow:
        0 12px 30px rgba(17, 148, 70, .32),
        0 3px 10px rgba(0, 0, 0, .22);
    color: #fff;
    transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}

.ae-floating-whatsapp__button::before {
    content: "";
    position: absolute;
    inset: -5px;
    border: 1px solid rgba(37, 211, 102, .24);
    border-radius: inherit;
    animation: ae-wa-ring 2.8s ease-out infinite;
}

.ae-floating-whatsapp__button .fa-whatsapp {
    position: relative;
    z-index: 1;
    display: block;
    flex: 0 0 auto;
    margin: 0;
    color: currentColor;
    font-size: 31px;
    line-height: 1;
    transform: translateY(-1px);
    transform-origin: 50% 50%;
}

.ae-floating-whatsapp__link:hover .ae-floating-whatsapp__button,
.ae-floating-whatsapp__link:focus-visible .ae-floating-whatsapp__button {
    transform: translateY(-2px) scale(1.035);
    box-shadow:
        0 16px 34px rgba(17, 148, 70, .38),
        0 4px 12px rgba(0, 0, 0, .24);
    filter: saturate(1.05) brightness(1.02);
}

.ae-floating-whatsapp__link:hover .ae-floating-whatsapp__bubble,
.ae-floating-whatsapp__link:focus-visible .ae-floating-whatsapp__bubble {
    border-color: rgba(37, 211, 102, .35);
}

.ae-floating-whatsapp__link:focus-visible {
    outline: none;
}

.ae-floating-whatsapp__link:focus-visible .ae-floating-whatsapp__button {
    outline: 3px solid rgba(37, 211, 102, .34);
    outline-offset: 3px;
}

@keyframes ae-wa-bubble-in {
    from {
        opacity: 0;
        transform: translateX(8px) scale(.97);
    }
    to {
        opacity: 1;
        transform: translateX(0) scale(1);
    }
}

@keyframes ae-wa-ring {
    0%, 55% {
        opacity: 0;
        transform: scale(.94);
    }
    65% {
        opacity: .75;
    }
    100% {
        opacity: 0;
        transform: scale(1.14);
    }
}

@media (max-width: 1280px) {
    .ae-floating-whatsapp__bubble {
        display: none !important;
    }

    .ae-floating-whatsapp__link {
        gap: 0;
    }
}

@media (max-width: 640px) {
    .ae-floating-whatsapp {
        right: max(14px, env(safe-area-inset-right));
        bottom: max(16px, calc(env(safe-area-inset-bottom) + 12px));
    }

    .ae-floating-whatsapp__link {
        gap: 9px;
    }

    .ae-floating-alert {
        display: none;
    }

    .ae-floating-whatsapp__bubble {
        min-width: 0;
        max-width: min(208px, calc(100vw - 92px));
        padding: 10px 12px 10px;
        border-radius: 14px;
    }

    .ae-floating-whatsapp__bubble strong {
        font-size: 12px;
    }

    .ae-floating-whatsapp__bubble > span {
        font-size: 9px;
    }

    .ae-floating-whatsapp__button {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }

    .ae-floating-whatsapp__button .fa-whatsapp {
        font-size: 28px;
    }
}

@media (max-width: 360px) {
    .ae-floating-whatsapp__bubble {
        max-width: 178px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ae-floating-whatsapp__bubble,
    .ae-floating-whatsapp__button::before {
        animation: none;
    }

    .ae-floating-whatsapp__button {
        transition: none;
    }

    .ae-floating-alert,
    .ae-floating-alert__arrow {
        transition: none;
    }
}
