/* ===== WhatsApp: moved from the floating corner button into the top bar ===== */
a.whatsapp { display: none !important; }
.top .socials li.wa-top a { background-color: #25D366; color: #fff; }
.top .socials li.wa-top a i { color: #fff; font-size: 17px; }
.top .socials li.wa-top a:hover { background-color: #1ebe5b; color: #fff; }

/* ===== Chatbot launcher — doctor avatar (same look as Istiklal Portal) =====
   The AI Health Clinic widget renders a plain coloured circle with an SVG chat
   bubble (#aihc-embed > button). Keep the widget's own button (drag / open / close
   logic intact) and only swap what it shows in the CLOSED state, so the "X"
   close icon still appears while the chat panel is open. */
#aihc-embed > button[aria-expanded="false"] {
    background: #ffffff url('/images/chatbot-doctor.png') no-repeat center 58% / 118% !important;
    box-shadow: 0 8px 24px rgba(15, 23, 42, .28), inset 0 0 0 2px #0064c8 !important;
    width: 78px !important;
    height: 78px !important;
}
#aihc-embed > button[aria-expanded="false"] svg { display: none !important; }

/* Keep the launcher off the viewport edge; js/chat-launcher.js flips the nudge
   with the corner it sits in, so it is never pushed off-screen. */
#aihc-embed > button { right: 34px !important; bottom: 30px !important; }
#aihc-embed.aihc-side-left > button { right: -34px !important; }
#aihc-embed.aihc-side-top  > button { bottom: -30px !important; }

/* ===== Welcome bubble popping out of the launcher (built by js/chat-launcher.js) ===== */
.aihc-welcome {
    position: fixed;
    z-index: 2147482000;
    width: 260px;
    max-width: calc(100vw - 24px);
    background: #ffffff;
    color: #0a2e52;
    font-size: 14px;
    line-height: 1.55;
    padding: 12px 30px 12px 16px;
    border-radius: 14px;
    border: 1px solid #e3edf7;
    box-shadow: 0 12px 30px rgba(15, 23, 42, .22);
    cursor: pointer;
    opacity: 0;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity .25s ease, transform .25s ease;
}
.aihc-welcome.is-on { opacity: 1; transform: translateY(0); pointer-events: auto; }
.aihc-welcome[dir="rtl"] { padding: 12px 16px 12px 30px; }
.aihc-welcome .aihc-welcome-txt b { color: #0064c8; }
.aihc-welcome .aihc-welcome-x {
    position: absolute; top: 6px; right: 9px;
    font-size: 17px; line-height: 1; color: #9fb3c8; cursor: pointer;
}
.aihc-welcome[dir="rtl"] .aihc-welcome-x { right: auto; left: 9px; }
.aihc-welcome:hover { box-shadow: 0 16px 36px rgba(15, 23, 42, .28); }
.aihc-welcome::after {
    content: ""; position: absolute; width: 14px; height: 14px;
    left: var(--aihc-arrow-x, 20px);
    background: #fff; border: 1px solid #e3edf7;
}
.aihc-welcome.aihc-arrow-down::after { bottom: -8px; border-top: 0; border-left: 0; transform: rotate(45deg); }
.aihc-welcome.aihc-arrow-up::after   { top: -8px; border-bottom: 0; border-right: 0; transform: rotate(45deg); }

/* ===== Back-to-top button: beside the chatbot (left of it) so they no longer overlap.
   Only on pages that actually have the chatbot; elsewhere it keeps its corner. ===== */
body:has(#aihc-embed) #scroll { bottom: 38px !important; right: 120px !important; }
