/* WhatsApp floating button */
#aibwha-root {
    position: fixed;
    bottom: 5px;
    z-index: 9998;
    font-family: inherit;
}
#aibwha-root.aibwha-right { right: 7px; }
#aibwha-root.aibwha-left  { left:  7px; }

#aibwha-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--aibwha-bg, #000000);
    color: #fff;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
    transition: transform .2s ease, box-shadow .2s ease;
    position: relative;
}
#aibwha-btn:hover, #aibwha-btn:focus {
    transform: scale(1.08);
    box-shadow: 0 6px 18px rgba(0,0,0,.24);
    color: #fff;
    text-decoration: none;
}
#aibwha-btn svg { width: 26px; height: 26px; display: block; fill: #fff; }

#aibwha-tooltip {
    position: absolute;
    bottom: 50%;
    transform: translateY(50%);
    background: #fff;
    color: #333;
    padding: 8px 12px;
    border-radius: 6px;
    box-shadow: 0 2px 8px rgba(0,0,0,.18);
    font-size: 14px;
    line-height: 1.3;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
#aibwha-root.aibwha-right #aibwha-tooltip { right: 72px; }
#aibwha-root.aibwha-left  #aibwha-tooltip { left:  72px; }
#aibwha-root:hover #aibwha-tooltip,
#aibwha-btn:focus + #aibwha-tooltip { opacity: 1; }

/* Closed-hours: button is shown but not clickable; the tooltip carries
   the closed-hours message and is revealed on hover/focus. */
#aibwha-root.aibwha-closed #aibwha-btn {
    cursor: not-allowed;
    opacity: .75;
    animation: none;
    filter: grayscale(.15);
}
#aibwha-root.aibwha-closed #aibwha-btn:hover,
#aibwha-root.aibwha-closed #aibwha-btn:focus {
    transform: none;
    box-shadow: 0 4px 12px rgba(0,0,0,.18);
}
#aibwha-tooltip.aibwha-tooltip-closed {
    background: #ffffff;
    color: #2c3e50;
    border: 1px solid #e3e6ec;
    white-space: normal;
    width: 320px;
    max-width: 80vw;
    padding: 12px 14px;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    border-radius: 8px;
    text-align: left;
}
#aibwha-tooltip.aibwha-tooltip-closed:before {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    transform: translateY(-50%);
}
#aibwha-root.aibwha-right #aibwha-tooltip.aibwha-tooltip-closed:before {
    right: -14px;
    border-left-color: #ffffff;
}
#aibwha-root.aibwha-left #aibwha-tooltip.aibwha-tooltip-closed:before {
    left: -14px;
    border-right-color: #ffffff;
}

/* Rate-limit notice — shown next to the button when the click is refused
   because the configured language hit its clicks-per-window quota. Hidden by
   default; revealed by adding .aibwha-show from the front script. */
#aibwha-limit {
    position: absolute;
    bottom: 50%;
    transform: translateY(50%);
    background: #ffffff;
    color: #b91c1c;
    border: 1px solid #f0caca;
    white-space: normal;
    width: 280px;
    max-width: 80vw;
    padding: 12px 14px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.45;
    box-shadow: 0 4px 14px rgba(0,0,0,.12);
    border-radius: 8px;
    text-align: left;
    opacity: 0;
    pointer-events: none;
    transition: opacity .2s ease;
}
#aibwha-root.aibwha-right #aibwha-limit { right: 72px; }
#aibwha-root.aibwha-left  #aibwha-limit { left:  72px; }
#aibwha-limit.aibwha-show { opacity: 1; }
#aibwha-limit:before {
    content: "";
    position: absolute;
    top: 50%;
    width: 0;
    height: 0;
    border: 7px solid transparent;
    transform: translateY(-50%);
}
#aibwha-root.aibwha-right #aibwha-limit:before {
    right: -14px;
    border-left-color: #ffffff;
}
#aibwha-root.aibwha-left #aibwha-limit:before {
    left: -14px;
    border-right-color: #ffffff;
}

@keyframes aibwha-pulse {
    0%   { box-shadow: 0 4px 12px rgba(0,0,0,.18), 0 0 0 0 rgba(37,211,102,.55); }
    70%  { box-shadow: 0 4px 12px rgba(0,0,0,.18), 0 0 0 16px rgba(37,211,102,0); }
    100% { box-shadow: 0 4px 12px rgba(0,0,0,.18), 0 0 0 0 rgba(37,211,102,0); }
}

@media (max-width: 480px) {
    #aibwha-root { bottom: 5px; }
    #aibwha-root.aibwha-right { right: 7px; }
    #aibwha-root.aibwha-left  { left:  7px; }
    #aibwha-btn { width: 50px; height: 50px; }
    #aibwha-btn svg { width: 26px; height: 26px; }
    #aibwha-tooltip:not(.aibwha-tooltip-closed) { display: none; }
    #aibwha-tooltip.aibwha-tooltip-closed { width: 260px; }
    #aibwha-limit { width: 260px; }
}
