/* RJ Web Chat Bot 1.3.0 - modern UI (WhatsApp button ke upar) */
#rjwcb, #rjwcb * { box-sizing: border-box; }
#rjwcb { --c1: #4f46e5; --c2: #7c3aed; --ink: #0f172a; --ink2: #334155; --muted: #64748b; --line: #e6e8f0; --bg: #f6f7fb;
  --sh: 0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.06);
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 14.5px; line-height: 1.5; color: var(--ink); -webkit-font-smoothing: antialiased; }

/* Impreza theme input/textarea/button par min-height 3em, line-height 3em, inset shadow, focus bg deti hai -> reset */
#rjwcb input, #rjwcb textarea, #rjwcb button {
  -webkit-appearance: none !important; appearance: none !important; margin: 0 !important;
  min-height: 0 !important; height: auto; line-height: normal !important;
  box-shadow: none !important; text-transform: none !important; letter-spacing: normal;
  font-family: inherit !important; font-weight: inherit; vertical-align: middle !important; }
#rjwcb input:focus, #rjwcb textarea:focus { box-shadow: none !important; outline: 0 !important; }
#rjwcb button::before, #rjwcb button::after { display: none !important; }
#rjwcb svg { display: block; }
#rjwcb .eye { fill: var(--c1); }

/* ── Launcher ── */
#rjwcb .rjwcb-launch { position: fixed; right: 16px; bottom: 90px; width: 58px; height: 58px; border-radius: 50%;
  border: 0; padding: 0; cursor: pointer; z-index: 10000001; color: #fff;
  background: linear-gradient(140deg, var(--c1) 0%, var(--c2) 100%);
  box-shadow: 0 10px 25px -5px rgba(79,70,229,.55), 0 4px 10px -2px rgba(15,23,42,.18) !important;
  display: grid; place-items: center; transition: transform .25s cubic-bezier(.2,.8,.2,1); }
#rjwcb .rjwcb-launch:hover { transform: translateY(-2px) scale(1.05); }
#rjwcb .rjwcb-launch:focus-visible { outline: 3px solid #c7d2fe; outline-offset: 3px; }
#rjwcb .rjwcb-launch .bot { width: 34px; height: 34px; transition: transform .3s ease, opacity .2s ease; }
#rjwcb .rjwcb-launch .eye { animation: rjwcb-blink 4.5s infinite; transform-origin: center; transform-box: fill-box; }
@keyframes rjwcb-blink { 0%, 92%, 100% { transform: scaleY(1); } 95% { transform: scaleY(.15); } }
#rjwcb .rjwcb-launch .x { position: absolute; width: 22px; height: 22px; opacity: 0; transform: rotate(-90deg) scale(.5); transition: transform .3s ease, opacity .2s ease; }
#rjwcb.open .rjwcb-launch .bot { opacity: 0; transform: rotate(90deg) scale(.5); }
#rjwcb.open .rjwcb-launch .x { opacity: 1; transform: none; }
#rjwcb .rjwcb-launch .ring { position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--c1); animation: rjwcb-ring 2.6s ease-out infinite; pointer-events: none; }
#rjwcb.open .rjwcb-launch .ring, #rjwcb.seen .rjwcb-launch .ring { display: none; }
@keyframes rjwcb-ring { 0% { transform: scale(1); opacity: .6; } 80%, 100% { transform: scale(1.5); opacity: 0; } }
#rjwcb .rjwcb-badge { position: absolute; top: -3px; right: -3px; height: 20px; min-width: 20px; padding: 0 5px; border-radius: 10px;
  background: #ef4444; color: #fff; font-size: 11px; font-weight: 700; line-height: 16px; text-align: center; border: 2px solid #fff; }
#rjwcb.seen .rjwcb-badge, #rjwcb.open .rjwcb-badge { display: none; }

/* ── Tease ── */
#rjwcb .rjwcb-tease { position: fixed; right: 86px; bottom: 92px; z-index: 10000001; width: 250px; display: flex; gap: 10px; align-items: flex-start;
  background: #fff; color: var(--ink); border-radius: 16px; padding: 12px 30px 12px 12px; border: 1px solid var(--line);
  box-shadow: 0 16px 40px -8px rgba(15,23,42,.22); cursor: pointer;
  opacity: 0; transform: translateY(10px) scale(.96); transform-origin: bottom right; pointer-events: none; transition: opacity .3s ease, transform .3s cubic-bezier(.2,.8,.2,1); }
#rjwcb .rjwcb-tease.show { opacity: 1; transform: none; pointer-events: auto; }
#rjwcb .rjwcb-tease .rjwcb-ava { width: 34px; height: 34px; }
#rjwcb .rjwcb-tease b { display: block; font-size: 14px; font-weight: 700; margin-bottom: 1px; }
#rjwcb .rjwcb-tease span { font-size: 13px; color: var(--muted); line-height: 1.4; display: block; }
#rjwcb .rjwcb-tease .tx { position: absolute; top: 6px; right: 6px; width: 22px; height: 22px; border: 0; border-radius: 50%; background: #f1f5f9; color: var(--muted);
  display: grid; place-items: center; cursor: pointer; padding: 0; }
#rjwcb .rjwcb-tease .tx svg { width: 12px; height: 12px; }

/* avatar (gradient gola + safed bot) */
#rjwcb .rjwcb-ava { border-radius: 50%; display: grid; place-items: center; color: #fff; flex: none;
  background: linear-gradient(140deg, var(--c1), var(--c2)); }
#rjwcb .rjwcb-ava svg { width: 66%; height: 66%; }

/* ── Panel ── */
#rjwcb .rjwcb-panel { position: fixed; right: 16px; bottom: 160px; width: 384px; height: min(620px, calc(100vh - 180px));
  z-index: 10000002; background: var(--bg); border-radius: 24px; overflow: hidden; display: flex; flex-direction: column;
  box-shadow: 0 30px 70px -12px rgba(15,23,42,.35), 0 0 0 1px rgba(15,23,42,.05);
  opacity: 0; transform: translateY(20px) scale(.97); transform-origin: bottom right; pointer-events: none; visibility: hidden;
  transition: opacity .25s ease, transform .3s cubic-bezier(.2,.8,.2,1), visibility 0s linear .3s; }
#rjwcb.open .rjwcb-panel { opacity: 1; transform: none; pointer-events: auto; visibility: visible; transition-delay: 0s; }

#rjwcb .rjwcb-head { position: relative; color: #fff; padding: 16px 14px 16px 16px; display: flex; align-items: center; gap: 12px; flex: none; overflow: hidden;
  background: radial-gradient(120% 140% at 0% 0%, rgba(255,255,255,.18) 0, rgba(255,255,255,0) 45%), linear-gradient(135deg, var(--c1), var(--c2)); }
#rjwcb .rjwcb-head::after { content: ""; position: absolute; right: -40px; top: -70px; width: 170px; height: 170px; border-radius: 50%;
  background: rgba(255,255,255,.07); pointer-events: none; }
#rjwcb .rjwcb-av { position: relative; width: 44px; height: 44px; border-radius: 14px; background: #fff; color: var(--c1); display: grid; place-items: center; flex: none;
  box-shadow: 0 4px 12px rgba(15,23,42,.18); }
#rjwcb .rjwcb-av svg { width: 30px; height: 30px; }
#rjwcb .rjwcb-av .eye { fill: #fff; }
#rjwcb .rjwcb-av i { position: absolute; right: -3px; bottom: -3px; width: 13px; height: 13px; border-radius: 50%; background: #22c55e; border: 2.5px solid #fff; }
#rjwcb .rjwcb-ht { flex: 1; min-width: 0; position: relative; z-index: 1; }
#rjwcb .rjwcb-ht b { display: block; font-size: 16px; font-weight: 700; letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.3; }
#rjwcb .rjwcb-ht span { display: flex; align-items: center; gap: 6px; font-size: 12.5px; opacity: .92; margin-top: 2px; }
#rjwcb .rjwcb-ht span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
#rjwcb .rjwcb-hb { position: relative; z-index: 1; border: 0; background: rgba(255,255,255,.15); color: #fff; width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center; cursor: pointer; flex: none; text-decoration: none; padding: 0; transition: background .15s ease; }
#rjwcb .rjwcb-hb:hover { background: rgba(255,255,255,.28); }
#rjwcb .rjwcb-hb svg { width: 19px; height: 19px; }

/* ── Body ── */
#rjwcb .rjwcb-body { flex: 1; overflow-y: auto; padding: 0 14px 12px; overscroll-behavior: contain; }
#rjwcb .rjwcb-body::-webkit-scrollbar { width: 6px; }
#rjwcb .rjwcb-body::-webkit-scrollbar-thumb { background: #d5d9e4; border-radius: 3px; }

/* Welcome hero */
#rjwcb .rjwcb-hero { text-align: center; padding: 22px 8px 6px; }
#rjwcb .rjwcb-hero .rjwcb-ava { width: 58px; height: 58px; margin: 0 auto 12px; box-shadow: 0 10px 22px -6px rgba(79,70,229,.55); }
#rjwcb .rjwcb-hero .t { margin: 0 0 4px; font-size: 17px; line-height: 1.35; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
#rjwcb .rjwcb-hero .s { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }

/* 1.2.0: yaad wala number + Change */
#rjwcb .rjwcb-me:empty { display: none; }
#rjwcb .rjwcb-me { display: inline-flex; align-items: center; gap: 6px; margin: 12px auto 0; padding: 5px 6px 5px 10px; border-radius: 99px;
  background: #fff; box-shadow: 0 0 0 1px var(--line); font-size: 12px; color: var(--muted); max-width: 100%; }
#rjwcb .rjwcb-me svg { width: 13px; height: 13px; color: var(--c1); flex: none; }
#rjwcb .rjwcb-me b { color: var(--ink); font-weight: 600; letter-spacing: .02em; }
#rjwcb .rjwcb-me button { border: 0; background: #eef2ff; color: var(--c1); font-size: 11.5px; font-weight: 600; padding: 3px 9px !important;
  border-radius: 99px; cursor: pointer; line-height: 1.4 !important; }
#rjwcb .rjwcb-me button:hover { background: var(--c1); color: #fff; }
#rjwcb .rjwcb-quick { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 14px 0 4px; }
#rjwcb .rjwcb-qa { display: flex; align-items: center; gap: 9px; text-align: left; border: 1px solid var(--line); background: #fff; border-radius: 14px;
  padding: 10px !important; cursor: pointer; color: var(--ink); font-size: 13px; font-weight: 600; line-height: 1.25 !important;
  box-shadow: var(--sh) !important; transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
#rjwcb .rjwcb-qa:hover { border-color: var(--c1); transform: translateY(-1px); box-shadow: 0 6px 16px -6px rgba(79,70,229,.35) !important; }
#rjwcb .rjwcb-qa i { width: 30px; height: 30px; border-radius: 10px; flex: none; display: grid; place-items: center; color: var(--c1);
  background: linear-gradient(140deg, rgba(79,70,229,.12), rgba(124,58,237,.12)); }
#rjwcb .rjwcb-qa i svg { width: 17px; height: 17px; }

/* Messages */
#rjwcb .rjwcb-row { display: flex; gap: 8px; margin-top: 4px; align-items: flex-start; animation: rjwcb-in .28s cubic-bezier(.2,.8,.2,1); }
#rjwcb .rjwcb-row.first { margin-top: 16px; }
@keyframes rjwcb-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
#rjwcb .rjwcb-row.me { justify-content: flex-end; }
#rjwcb .rjwcb-row > .rjwcb-ava, #rjwcb .rjwcb-row > .sp { width: 28px; height: 28px; flex: none; }
#rjwcb .rjwcb-row.first > .rjwcb-ava { margin-top: 20px; }
#rjwcb .rjwcb-col { display: flex; flex-direction: column; align-items: flex-start; min-width: 0; max-width: 82%; }
#rjwcb .rjwcb-row.me .rjwcb-col { align-items: flex-end; }
#rjwcb .rjwcb-nm { font-size: 11.5px; color: var(--muted); font-weight: 600; margin: 0 0 4px 2px; line-height: 16px; white-space: nowrap; }
#rjwcb .rjwcb-nm em { font-style: normal; font-weight: 400; color: #94a3b8; margin-left: 4px; }
#rjwcb .rjwcb-row.me .rjwcb-nm { margin: 0 2px 4px 0; }
#rjwcb .rjwcb-b { padding: 10px 13px; border-radius: 6px 18px 18px 18px; background: #fff; color: var(--ink2); box-shadow: var(--sh);
  white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; font-size: 14.5px; line-height: 1.5; }
#rjwcb .rjwcb-row:not(.first) .rjwcb-b { border-radius: 18px; }
#rjwcb .rjwcb-row.me .rjwcb-b { background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; border-radius: 18px 6px 18px 18px; box-shadow: 0 4px 12px -4px rgba(79,70,229,.45); }
#rjwcb .rjwcb-row.me:not(.first) .rjwcb-b { border-radius: 18px; }
#rjwcb .rjwcb-b b { color: var(--ink); font-weight: 700; }
#rjwcb .rjwcb-row.me .rjwcb-b b { color: #fff; }
#rjwcb .rjwcb-b a { color: var(--c1); font-weight: 600; text-decoration: none; word-break: break-all; }
#rjwcb .rjwcb-row.me .rjwcb-b a { color: #fff; text-decoration: underline; }
#rjwcb .rjwcb-b a.rjwcb-cta { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 4px 0; padding: 9px 12px;
  border-radius: 12px; background: linear-gradient(135deg, var(--c1), var(--c2)); color: #fff; font-size: 13.5px; font-weight: 600; word-break: normal; white-space: normal; line-height: 1.3; }
#rjwcb .rjwcb-b a.rjwcb-cta:hover { filter: brightness(1.08); }
#rjwcb .rjwcb-b a.rjwcb-cta svg { width: 16px; height: 16px; flex: none; }
#rjwcb .rjwcb-b a.rjwcb-cta.ext { background: #eef2ff; color: var(--c1); }
#rjwcb .rjwcb-b.err { background: #fff5f5; color: #9f1239; box-shadow: inset 0 0 0 1px #fecdd3; }
#rjwcb .rjwcb-b.ph { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; letter-spacing: .02em; white-space: nowrap; }
#rjwcb .rjwcb-b.ph svg { width: 15px; height: 15px; }

#rjwcb .rjwcb-typing { display: inline-flex; align-items: center; gap: 4px; padding: 14px 15px; }
#rjwcb .rjwcb-typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--c1); opacity: .35; animation: rjwcb-bl 1.2s infinite ease-in-out; }
#rjwcb .rjwcb-typing i:nth-child(2) { animation-delay: .15s; }
#rjwcb .rjwcb-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes rjwcb-bl { 0%, 60%, 100% { transform: translateY(0); opacity: .3; } 30% { transform: translateY(-4px); opacity: .9; } }
#rjwcb .rjwcb-slow { font-size: 11.5px; color: var(--muted); margin: 6px 0 0 36px; }

/* Phone card */
#rjwcb .rjwcb-pcard { margin: 8px 0 4px 36px; background: #fff; border-radius: 18px; padding: 14px; box-shadow: 0 8px 24px -10px rgba(15,23,42,.18), 0 0 0 1px var(--line);
  animation: rjwcb-in .3s cubic-bezier(.2,.8,.2,1); }
#rjwcb .rjwcb-ptop { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
#rjwcb .rjwcb-ptop i { width: 36px; height: 36px; border-radius: 12px; flex: none; display: grid; place-items: center; color: var(--c1);
  background: linear-gradient(140deg, rgba(79,70,229,.12), rgba(124,58,237,.12)); }
#rjwcb .rjwcb-ptop i svg { width: 19px; height: 19px; }
#rjwcb .rjwcb-ptop b { display: block; font-size: 14px; font-weight: 700; color: var(--ink); line-height: 1.3; }
#rjwcb .rjwcb-ptop span { display: block; font-size: 12px; color: var(--muted); line-height: 1.35; }
#rjwcb .rjwcb-pin { display: flex; align-items: center; height: 46px; border: 1.5px solid var(--line); border-radius: 12px; overflow: hidden; background: #f8fafc;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
#rjwcb .rjwcb-pin:focus-within { border-color: var(--c1); background: #fff; box-shadow: 0 0 0 4px rgba(79,70,229,.12); }
#rjwcb .rjwcb-pin span { display: flex; align-items: center; height: 24px; padding: 0 10px 0 13px; color: var(--ink); font-weight: 700; font-size: 15px;
  border-right: 1.5px solid var(--line); line-height: 1; }
#rjwcb .rjwcb-pin input { flex: 1; min-width: 0; height: 100% !important; border: 0 !important; border-radius: 0 !important; padding: 0 12px !important;
  font-size: 15.5px !important; font-weight: 600; letter-spacing: .04em; color: var(--ink) !important; background: transparent !important; }
#rjwcb .rjwcb-pin input::placeholder { color: #a5adbd; font-weight: 500; }
#rjwcb .rjwcb-pbtn { margin-top: 10px !important; width: 100%; height: 44px; border: 0; border-radius: 12px; padding: 0 12px !important; font-weight: 700; font-size: 14.5px; color: #fff;
  cursor: pointer; background: linear-gradient(135deg, var(--c1), var(--c2)); display: flex; align-items: center; justify-content: center; gap: 8px;
  box-shadow: 0 6px 16px -6px rgba(79,70,229,.6) !important; transition: filter .15s ease; }
#rjwcb .rjwcb-pbtn:hover { filter: brightness(1.07); }
#rjwcb .rjwcb-pbtn svg { width: 16px; height: 16px; }
#rjwcb .rjwcb-pbtn[disabled] { opacity: .65; cursor: default; }
#rjwcb .rjwcb-perr { color: #e11d48; font-size: 12px; margin-top: 7px; }
#rjwcb .rjwcb-perr:empty { display: none; }
#rjwcb .rjwcb-pnote { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11.5px; color: var(--muted); margin-top: 10px; }
#rjwcb .rjwcb-pnote svg { width: 12px; height: 12px; }

/* ── Composer ── */
#rjwcb .rjwcb-foot { flex: none; background: #fff; padding: 10px 12px 9px; box-shadow: 0 -1px 0 var(--line); }
#rjwcb .rjwcb-in { display: flex; gap: 6px; align-items: flex-end; border: 1.5px solid var(--line); border-radius: 18px; padding: 4px; background: #f8fafc;
  transition: border-color .15s ease, background .15s ease, box-shadow .15s ease; }
#rjwcb .rjwcb-in:focus-within { border-color: var(--c1); background: #fff; box-shadow: 0 0 0 4px rgba(79,70,229,.1); }
#rjwcb .rjwcb-in textarea { flex: 1; min-width: 0; resize: none !important; overflow-y: hidden; display: block;
  border: 0 !important; border-radius: 0 !important; padding: 9px 4px 9px 10px !important; background: transparent !important;
  font-size: 14.5px !important; line-height: 20px !important; height: 38px; max-height: 110px; color: var(--ink) !important; }
#rjwcb .rjwcb-in textarea::placeholder { color: #94a3b8; }
#rjwcb .rjwcb-send { width: 38px; height: 38px; border-radius: 13px; border: 0; color: #fff; cursor: pointer; flex: none; padding: 0;
  background: linear-gradient(135deg, var(--c1), var(--c2)); display: grid; place-items: center; transition: background .15s ease, transform .15s ease; }
#rjwcb .rjwcb-send:not([disabled]):hover { transform: scale(1.06); }
#rjwcb .rjwcb-send[disabled] { background: #e2e8f0; color: #94a3b8; cursor: default; }
#rjwcb .rjwcb-send svg { width: 18px; height: 18px; }
#rjwcb .rjwcb-pow { display: flex; align-items: center; justify-content: center; gap: 5px; font-size: 11px; color: #94a3b8; margin-top: 8px; line-height: 1.2; }
#rjwcb .rjwcb-pow svg { width: 12px; height: 12px; }
#rjwcb .rjwcb-pow a { display: inline-flex; align-items: center; gap: 4px; color: #16a34a; font-weight: 600; text-decoration: none; }
#rjwcb .rjwcb-pow a:hover { text-decoration: underline; }

/* Phone par: poori screen */
@media (max-width: 480px) {
  #rjwcb .rjwcb-panel { right: 0; bottom: 0; left: 0; top: 0; width: 100%; height: 100%; height: 100dvh; border-radius: 0; transform-origin: bottom center; }
  #rjwcb.open .rjwcb-launch, #rjwcb.open .rjwcb-tease { display: none; }
  #rjwcb .rjwcb-head { padding-top: max(14px, env(safe-area-inset-top)); }
  #rjwcb .rjwcb-foot { padding-bottom: max(9px, env(safe-area-inset-bottom)); }
  #rjwcb .rjwcb-in textarea, #rjwcb .rjwcb-pin input { font-size: 16px !important; } /* iOS zoom na ho */
  #rjwcb .rjwcb-tease { right: 84px; width: 220px; }
  #rjwcb .rjwcb-col { max-width: 86%; }
}
@media (prefers-reduced-motion: reduce) {
  #rjwcb *, #rjwcb *::before, #rjwcb *::after { animation: none !important; transition: none !important; }
}
