/* ═══════════════════════════════════════════════════════════════
   Chat launcher stand-in
   Shown until the chat widget bundle is loaded on first use
   (Views/Shared/Components/ChatWidget/Default.cshtml,
   assets/_chat-widget-loader.js), then replaced by the bundle's own
   launcher. Same place, size, colour and icon as that launcher as
   styled in Content/v3/chat-widget/css/overrides.css, so nothing
   moves when the swap happens.
   ═══════════════════════════════════════════════════════════════ */

.chat-launcher {
    position: fixed;
    right: 16px;
    bottom: var(--s-4, 24px);
    z-index: 70;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 50%;
    background: var(--color-action, #FF6D59);
    color: var(--color-action-fg, #fff);
    cursor: pointer;
    transition: transform .15s ease;
}

.chat-launcher:hover {
    transform: scale(1.1);
}

.chat-launcher:focus-visible {
    outline: 2px solid var(--border-focus, var(--color-action, #FF6D59));
    outline-offset: 3px;
}

.chat-launcher svg {
    width: 24px;
    height: 24px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Bundle is downloading: the click registered, the chat is on its way. */
.chat-launcher.is-loading {
    cursor: progress;
    animation: chat-launcher-pulse 1s ease-in-out infinite alternate;
}

@keyframes chat-launcher-pulse {
    to { opacity: .6; }
}

/* Clear of the listing page's fixed "Boka" bar (76px tall) while it is showing. */
@media (max-width: 768px) {
    body:has(.mobile-bar:not(.is-hidden)) .chat-launcher {
        bottom: 88px;
    }
}

/* Phone size of the bundle's mobile launcher: 44px, the smallest comfortable tap target. */
@media (max-width: 767px) {
    .chat-launcher {
        bottom: 16px;
        width: 44px;
        height: 44px;
        transition: bottom .2s ease, transform .15s ease;
    }

    .chat-launcher svg {
        width: 20px;
        height: 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .chat-launcher,
    .chat-launcher.is-loading {
        transition: none;
        animation: none;
    }
}

/* Out of the way while a DS modal is open, like the bundle's launcher (_modal.js). */
body[data-modal-open] .chat-launcher {
    display: none;
}
