.od-wa-widget,
.od-wa-widget * { box-sizing: border-box; }

.od-wa-widget {
  position: fixed;
  z-index: 10060;
  right: max(20px, env(safe-area-inset-right, 0px));
  bottom: max(20px, env(safe-area-inset-bottom, 0px));
  font-family: "Noto Sans Bengali", "Hind Siliguri", Inter, system-ui, sans-serif;
  color: #1b2636;
}

.od-wa-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  border: 0;
  color: inherit;
  background: transparent;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.od-wa-toggle-label {
  padding: 11px 15px;
  border: 1px solid rgba(222, 232, 237, .94);
  border-radius: 999px;
  color: #27374a;
  background: rgba(255,255,255,.97);
  box-shadow: 0 8px 26px rgba(16, 35, 48, .13);
  font-size: 11px;
  font-weight: 750;
  white-space: nowrap;
  transition: transform .2s ease, color .2s ease;
}

.od-wa-toggle:hover .od-wa-toggle-label { transform: translateX(-2px); color: #078665; }
.od-wa-toggle-icon {
  position: relative;
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,255,255,.46);
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #25d366, #08a96b);
  box-shadow: 0 12px 30px rgba(13, 173, 105, .34), inset 0 1px rgba(255,255,255,.28);
  transition: transform .2s ease, background .2s ease, box-shadow .2s ease;
}
.od-wa-toggle:hover .od-wa-toggle-icon { transform: translateY(-2px) scale(1.035); box-shadow: 0 16px 32px rgba(13,173,105,.4); }
.od-wa-toggle-icon svg { width: 28px; height: 28px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.od-wa-x-icon { display: none; }
.od-wa-widget.is-open .od-wa-toggle-icon { background: linear-gradient(145deg, #152b2a, #08775b); }
.od-wa-widget.is-open .od-wa-chat-icon { display: none; }
.od-wa-widget.is-open .od-wa-x-icon { display: block; }
.od-wa-widget.is-open .od-wa-toggle-label { color: #078665; }

.od-wa-panel {
  position: absolute;
  right: 0;
  bottom: calc(100% + 13px);
  width: min(360px, calc(100vw - 32px));
  max-height: min(480px, calc(100dvh - 110px));
  overflow: hidden auto;
  overscroll-behavior: contain;
  border: 1px solid rgba(220, 230, 235, .96);
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(15, 35, 48, .22), 0 4px 14px rgba(15,35,48,.08);
  transform-origin: bottom right;
  animation: od-wa-enter .2s ease-out both;
}
.od-wa-panel[hidden] { display: none; }
.od-wa-panel-head {
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 16px;
  color: #fff;
  background: linear-gradient(115deg, #0b8d70, #13b98d);
}
.od-wa-panel-head img { width: 42px; height: 42px; flex: 0 0 auto; padding: 3px; border-radius: 50%; background: #fff; object-fit: contain; }
.od-wa-brand { min-width: 0; display: grid; gap: 4px; }
.od-wa-brand strong { font-size: 12px; letter-spacing: .01em; }
.od-wa-brand small { display: flex; align-items: center; gap: 6px; color: rgba(255,255,255,.82); font-size: 9px; }
.od-wa-brand small i { width: 6px; height: 6px; border-radius: 50%; background: #baffdf; box-shadow: 0 0 0 3px rgba(186,255,223,.16); }
.od-wa-close { width: 32px; height: 32px; display: grid; place-items: center; margin-left: auto; border: 1px solid rgba(255,255,255,.25); border-radius: 50%; color: #fff; background: rgba(255,255,255,.11); font-size: 22px; line-height: 1; cursor: pointer; }
.od-wa-close:hover { background: rgba(255,255,255,.23); }
.od-wa-body { padding: 18px; }
.od-wa-greeting { display: inline-block; margin-bottom: 8px; color: #07886b; font-size: 10px; font-weight: 800; }
.od-wa-body h2 { margin: 0 0 6px; color: #172538; font-size: 18px; line-height: 1.35; letter-spacing: -.025em; }
.od-wa-body>p { margin: 0; color: #748196; font-size: 10px; line-height: 1.7; }
.od-wa-topics { display: flex; flex-wrap: wrap; gap: 7px; margin: 14px 0; }
.od-wa-topics button { padding: 8px 10px; border: 1px solid #d9eee8; border-radius: 999px; color: #087c64; background: #f1fbf8; font-size: 9px; font-weight: 750; cursor: pointer; }
.od-wa-topics button:hover { border-color: #a8dfd1; background: #e7f8f3; }
.od-wa-message-label { display: block; margin: 0 0 6px; color: #526076; font-size: 9px; font-weight: 800; }
.od-wa-body textarea { width: 100%; min-height: 70px; resize: vertical; padding: 10px 11px; border: 1px solid #dfe6ed; border-radius: 11px; outline: none; color: #26364a; background: #fbfcfd; font: inherit; font-size: 10px; line-height: 1.55; }
.od-wa-body textarea:focus { border-color: #56c5a5; box-shadow: 0 0 0 3px rgba(27,178,136,.12); }
.od-wa-body textarea::placeholder { color: #9aa5b4; }
.od-wa-send { min-height: 43px; display: flex; align-items: center; justify-content: center; gap: 9px; margin-top: 11px; padding: 10px 13px; border-radius: 11px; color: #fff; background: linear-gradient(105deg, #1bbf78, #07976e); box-shadow: 0 7px 16px rgba(11,160,106,.2); font-size: 10px; font-weight: 850; transition: transform .18s ease, box-shadow .18s ease; }
.od-wa-send:hover { transform: translateY(-1px); box-shadow: 0 10px 20px rgba(11,160,106,.27); }
.od-wa-send svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.od-wa-send span { margin-left: 2px; font-size: 14px; }
.od-wa-footnote { display: block; margin-top: 9px; color: #97a1af; font-size: 8px; text-align: center; }

body.od-has-mobile-bottom-nav .od-wa-widget { bottom: calc(84px + env(safe-area-inset-bottom, 0px)); }

@keyframes od-wa-enter {
  from { opacity: 0; transform: translateY(8px) scale(.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 760px) {
  .od-wa-widget { right: max(13px, env(safe-area-inset-right, 0px)); bottom: max(15px, env(safe-area-inset-bottom, 0px)); }
  body.od-has-mobile-bottom-nav .od-wa-widget { bottom: calc(83px + env(safe-area-inset-bottom, 0px)); }
  .od-wa-toggle { gap: 0; }
  .od-wa-toggle-label { display: none; }
  .od-wa-toggle-icon { width: 58px; height: 58px; }
  .od-wa-panel { width: min(360px, calc(100vw - 26px)); max-height: calc(100dvh - 112px); border-radius: 18px; }
  body.od-has-mobile-bottom-nav .od-wa-panel { max-height: calc(100dvh - 165px); }
  .od-wa-panel-head { padding: 13px 14px; }
  .od-wa-body { padding: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .od-wa-panel { animation: none; }
  .od-wa-toggle-icon, .od-wa-toggle-label, .od-wa-send { transition: none; }
}
