/* =====================================================================
   Dr. Nambiar's — HELP DESK chat (floating, bottom-right)
   Green Ayurvedic theme · Poppins · har device par responsive
   ===================================================================== */
.dnhd-launch, .dnhd, .dnhd-tease { --hd-g950: #0d2a1d; --hd-g900: #123524; --hd-g800: #1b4a33; --hd-g700: #245f41; --hd-g600: #2f7a52; --hd-g100: #e7efe4; --hd-g50: #f3f7f1; --hd-gold: #d4a24c; --hd-terra: #b4552f; --hd-ink: #1d2a22; --hd-mute: #66756b; --hd-line: #e4e9e2; font-family: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif; }
.dnhd *, .dnhd *::before, .dnhd *::after, .dnhd-launch, .dnhd-tease { box-sizing: border-box; }

/* ---------------- launcher (call + WhatsApp ke saath stack hota hai) ---------------- */
.dnhd-dock { position: fixed; right: 25px; bottom: 70px; z-index: 9998; display: flex; flex-direction: column; gap: 14px; }
.dnhd-launch {
    position: relative; width: 58px; height: 58px; border-radius: 50%; border: 2px solid #fff; cursor: pointer; padding: 0;
    display: grid; place-items: center; color: #fff; font-size: 24px;
    background: linear-gradient(145deg, var(--hd-g700), var(--hd-g900));
    box-shadow: 0 8px 22px rgba(18, 53, 36, .38); transition: transform .25s ease;
    animation: dnhdPulse 2.4s infinite;
}
.dnhd-launch:hover { transform: scale(1.07); }
.dnhd-launch:focus-visible { outline: 3px solid var(--hd-gold); outline-offset: 3px; }
.dnhd-launch .dnhd-dot { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; border-radius: 50%; background: var(--hd-terra); border: 2px solid #fff; }
.dnhd-launch .dnhd-dot[hidden] { display: none; }
.dnhd-launch-tip {
    position: absolute; right: calc(100% + 12px); top: 50%; transform: translateY(-50%); white-space: nowrap; pointer-events: none;
    padding: 6px 12px; border-radius: 8px; background: var(--hd-g900); color: #fff; font-size: 12.5px; font-weight: 500; opacity: 0; transition: opacity .2s;
}
.dnhd-launch:hover .dnhd-launch-tip { opacity: 1; }
@keyframes dnhdPulse { 0% { box-shadow: 0 0 0 0 rgba(47, 122, 82, .5), 0 8px 22px rgba(18, 53, 36, .38); } 70% { box-shadow: 0 0 0 14px rgba(47, 122, 82, 0), 0 8px 22px rgba(18, 53, 36, .38); } 100% { box-shadow: 0 0 0 0 rgba(47, 122, 82, 0), 0 8px 22px rgba(18, 53, 36, .38); } }
.mhl-fixed-actions .dnhd-launch, .dnfl-fixed-actions .dnhd-launch, .dnfx-actions .dnhd-launch { margin: 0 auto; }
.mhl-fixed-actions .dnhd-launch-tip, .dnfl-fixed-actions .dnhd-launch-tip, .dnfx-actions .dnhd-launch-tip { right: calc(100% + 14px); }
@media (max-width: 480px) { .mhl-fixed-actions .dnhd-launch, .dnfl-fixed-actions .dnhd-launch, .dnfx-actions .dnhd-launch { width: 50px; height: 50px; font-size: 20px; } }

/* teaser bubble */
.dnhd-tease {
    position: fixed; z-index: 9998; right: 96px; bottom: 210px; max-width: 230px; padding: 12px 34px 12px 14px; border-radius: 14px 14px 4px 14px;
    background: #fff; color: var(--hd-ink); font-size: 13.5px; line-height: 1.45; box-shadow: 0 10px 30px rgba(0, 0, 0, .16); cursor: pointer;
    border: 1px solid var(--hd-line); animation: dnhdIn .3s ease;
}
.dnhd-tease b { color: var(--hd-g800); }
.dnhd-tease button { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: var(--hd-g50); color: var(--hd-mute); font-size: 13px; cursor: pointer; line-height: 1; }
.dnhd-tease[hidden] { display: none; }

/* ---------------- panel ---------------- */
.dnhd {
    position: fixed; z-index: 10040; right: 24px; bottom: 24px; width: 390px; height: min(640px, calc(100vh - 48px));
    display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: #f7f9f6;
    box-shadow: 0 24px 64px rgba(13, 42, 29, .32); border: 1px solid rgba(18, 53, 36, .08);
    transform-origin: bottom right; animation: dnhdOpen .25s ease;
}
.dnhd[hidden] { display: none; }
@keyframes dnhdOpen { from { opacity: 0; transform: translateY(16px) scale(.97); } }
@keyframes dnhdIn { from { opacity: 0; transform: translateY(8px); } }

.dnhd-head { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 14px 14px 16px; color: #fff; background: linear-gradient(135deg, var(--hd-g900), var(--hd-g700)); flex-shrink: 0; }
.dnhd-head::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: linear-gradient(90deg, var(--hd-gold), transparent); }
.dnhd-av { width: 44px; height: 44px; border-radius: 50%; background: #fff; display: grid; place-items: center; overflow: hidden; flex-shrink: 0; box-shadow: 0 0 0 3px rgba(255,255,255,.18); color: var(--hd-g800); font-size: 20px; }
.dnhd-av img { width: 100%; height: 100%; object-fit: contain; padding: 5px; }
.dnhd-ht { flex: 1; min-width: 0; }
.dnhd-ht b { display: block; font-size: 15.5px; font-weight: 600; line-height: 1.25; }
.dnhd-ht small { display: flex; align-items: center; gap: 6px; margin-top: 2px; font-size: 12px; color: rgba(255,255,255,.82); }
.dnhd-ht small i { width: 7px; height: 7px; border-radius: 50%; background: #4ade80; display: inline-block; }
.dnhd-hbtn { width: 34px; height: 34px; border-radius: 50%; border: 0; background: rgba(255,255,255,.14); color: #fff; font-size: 15px; cursor: pointer; display: grid; place-items: center; transition: background .2s; flex-shrink: 0; }
.dnhd-hbtn:hover { background: rgba(255,255,255,.26); }

.dnhd-menu { position: absolute; top: 58px; right: 52px; z-index: 3; min-width: 200px; padding: 8px; border-radius: 12px; background: #fff; box-shadow: 0 14px 34px rgba(0,0,0,.18); animation: dnhdIn .18s ease; }
.dnhd-menu[hidden] { display: none; }
.dnhd-menu p { margin: 2px 8px 6px; font-size: 11.5px; color: var(--hd-mute); text-align: center; }
.dnhd-menu button, .dnhd-menu a { width: 100%; display: flex; align-items: center; gap: 10px; padding: 9px 10px; border: 0; border-radius: 8px; background: none; color: var(--hd-ink); font: inherit; font-size: 13.5px; text-align: left; text-decoration: none; cursor: pointer; }
.dnhd-menu button:hover, .dnhd-menu a:hover { background: var(--hd-g50); color: var(--hd-g800); }
.dnhd-menu i { width: 16px; color: var(--hd-g600); text-align: center; }

/* ---------------- messages ---------------- */
.dnhd-log { flex: 1; overflow-y: auto; padding: 16px 14px 10px; display: flex; flex-direction: column; gap: 8px; overscroll-behavior: contain; scroll-behavior: smooth; }
.dnhd-meta { display: flex; align-items: center; gap: 6px; margin-top: 6px; font-size: 11px; color: var(--hd-mute); }
.dnhd-meta.me { justify-content: flex-end; }
.dnhd-meta img, .dnhd-meta .dnhd-mav { width: 18px; height: 18px; border-radius: 50%; background: var(--hd-g100); color: var(--hd-g700); display: grid; place-items: center; font-size: 9px; object-fit: contain; }
.dnhd-b { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 13.8px; line-height: 1.6; word-wrap: break-word; animation: dnhdIn .22s ease; }
.dnhd-b.bot { align-self: flex-start; background: #fff; color: var(--hd-ink); border: 1px solid var(--hd-line); border-top-left-radius: 4px; }
.dnhd-b.me { align-self: flex-end; background: var(--hd-g800); color: #fff; border-top-right-radius: 4px; }
.dnhd-b a { color: var(--hd-g700); font-weight: 600; text-decoration: none; }
.dnhd-b a:hover { text-decoration: underline; }
.dnhd-b.me a { color: #fff; }
.dnhd-b strong { font-weight: 600; }
.dnhd-b.card { width: 100%; max-width: 100%; }

.dnhd-typing { align-self: flex-start; display: inline-flex; gap: 4px; padding: 12px 14px; border-radius: 16px; border-top-left-radius: 4px; background: #fff; border: 1px solid var(--hd-line); }
.dnhd-typing i { width: 7px; height: 7px; border-radius: 50%; background: #9fb3a6; animation: dnhdDot 1.2s infinite; }
.dnhd-typing i:nth-child(2) { animation-delay: .15s; }
.dnhd-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dnhdDot { 0%, 60%, 100% { transform: translateY(0); opacity: .5; } 30% { transform: translateY(-4px); opacity: 1; } }

/* quick reply buttons */
.dnhd-q { display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.dnhd-q button, .dnhd-q a {
    width: 100%; min-height: 40px; padding: 8px 14px; border-radius: 22px; border: 1.5px solid var(--hd-g700); background: #fff;
    color: var(--hd-g800); font: inherit; font-size: 13.5px; font-weight: 500; text-align: center; text-decoration: none; cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 8px; transition: background .2s, color .2s;
}
.dnhd-q button:hover, .dnhd-q a:hover { background: var(--hd-g800); color: #fff; text-decoration: none; }
.dnhd-q .dnhd-wa { border-color: #1ea952; color: #128c3e; }
.dnhd-q .dnhd-wa:hover { background: #1ea952; color: #fff; }

/* contact form card */
.dnhd-form { text-align: center; }
.dnhd-form h5 { margin: 2px 0 2px; font-size: 14.5px; font-weight: 600; color: var(--hd-g900); }
.dnhd-form > p { margin: 0 0 12px; font-size: 12.5px; color: var(--hd-mute); }
.dnhd-fld { position: relative; display: flex; align-items: stretch; margin-bottom: 9px; border: 1.5px solid var(--hd-line); border-radius: 10px; background: var(--hd-g50); transition: border-color .2s, background .2s; }
.dnhd-fld:focus-within { border-color: var(--hd-g600); background: #fff; }
.dnhd-fld.bad { border-color: #d9534f; background: #fff7f6; }
.dnhd-fld > i { width: 40px; display: grid; place-items: center; color: var(--hd-g600); font-size: 14px; flex-shrink: 0; }
.dnhd-fld input, .dnhd-fld select { flex: 1; min-width: 0; height: 42px; padding: 0 12px 0 0; border: 0; background: transparent; font: inherit; font-size: 13.5px; color: var(--hd-ink); outline: none; }
.dnhd-fld select { cursor: pointer; }
.dnhd-cc { flex: 0 0 auto !important; width: 74px; padding: 0 4px !important; margin-right: 8px; border-right: 1px solid var(--hd-line) !important; font-weight: 600 !important; }
.dnhd-err { margin: -3px 0 8px; font-size: 12px; color: #c0392b; text-align: left; }
.dnhd-err[hidden] { display: none; }
.dnhd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.dnhd-submit { min-width: 120px; height: 42px; padding: 0 22px; border: 0; border-radius: 10px; background: var(--hd-g800); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; transition: background .2s; display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.dnhd-submit:hover { background: var(--hd-g950); }
.dnhd-submit:disabled { opacity: .7; cursor: wait; }
.dnhd-done { display: flex; align-items: center; gap: 10px; text-align: left; font-size: 13px; color: var(--hd-g800); }
.dnhd-done i { width: 34px; height: 34px; border-radius: 50%; background: var(--hd-g100); display: grid; place-items: center; flex-shrink: 0; }

/* ---------------- composer ---------------- */
.dnhd-foot { flex-shrink: 0; display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: #fff; border-top: 1px solid var(--hd-line); }
.dnhd-foot input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 1.5px solid var(--hd-line); border-radius: 24px; background: var(--hd-g50); font: inherit; font-size: 14px; color: var(--hd-ink); outline: none; transition: border-color .2s, background .2s; }
.dnhd-foot input:focus { border-color: var(--hd-g600); background: #fff; }
.dnhd-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--hd-g800); color: #fff; font-size: 16px; cursor: pointer; display: grid; place-items: center; flex-shrink: 0; transition: background .2s, transform .15s; }
.dnhd-send:hover { background: var(--hd-g950); transform: scale(1.05); }
.dnhd-powered { flex-shrink: 0; padding: 0 0 8px; background: #fff; text-align: center; font-size: 10.5px; color: #9aa79f; }

/* ---------------- responsive ---------------- */
@media (max-width: 575px) {
    .dnhd { right: 0; bottom: 0; left: 0; width: 100%; height: 100dvh; max-height: 100dvh; border-radius: 0; }
    .dnhd-dock { right: 15px; bottom: 87px; }
    .dnhd-launch { width: 52px; height: 52px; font-size: 21px; }
    .dnhd-tease { right: 78px; bottom: 200px; max-width: 200px; font-size: 12.5px; }
    .dnhd-launch-tip { display: none; }
    .dnhd-b { max-width: 90%; }
}
@media (prefers-reduced-motion: reduce) {
    .dnhd-launch, .dnhd, .dnhd-b, .dnhd-typing i { animation: none !important; }
}
body.dnhd-lock-m { overflow: hidden; }
