/* NIS Helpdesk — liquid glass overlay for Nahar International School. Overlay only. v=1 */
@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@500;600;700;800&display=swap");

#nis-chatbot-root {
  --accent: #f58220;
  --accent-2: #032e50;
  --accent-soft: rgba(245, 130, 32, 0.14);
  --cream: #eae6c1;
  --ink: #032e50;
  --ink-soft: #1a4a73;
  --muted: #5a738c;
  --frost: rgba(255, 255, 255, 0.55);
  --frost-strong: rgba(255, 255, 255, 0.72);
  --line: rgba(3, 46, 80, 0.12);
  --shadow: 0 20px 60px rgba(3, 46, 80, 0.22), inset 0 0 0 1px rgba(255,255,255,0.35);
  --shadow-soft: 0 12px 32px rgba(3, 46, 80, 0.14);
  --pill-top: 84%;
  --pill-clear: max(18px, env(safe-area-inset-bottom, 0px));
  --kb-inset: 0px;
  --rail: min(540px, calc(100vw - 32px));
  --radius: 20px;
  --panel-gap: 36px; /* visual space above pill (~12px clear of pill top) */
  --nav-clear: 88px; /* keep panel below site header / nav */
  --pill-h: 52px;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  z-index: 2147483000;
  position: relative;
  color: var(--ink);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

#nis-chatbot-root.is-busy .nis-pill-send {
  opacity: 0.55;
  pointer-events: none;
}

#nis-chatbot-root.is-busy .nis-chip {
  pointer-events: none;
  opacity: 0.7;
}

#nis-chatbot-root.is-ready {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

/* Hide while landing posts / fancybox / video overlays are open */
#nis-chatbot-root.is-ready.is-obscured {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

/* Critical: children with pointer-events:auto would still steal taps over Bootstrap posts */
#nis-chatbot-root.is-ready.is-obscured,
#nis-chatbot-root.is-ready.is-obscured * {
  pointer-events: none !important;
}

/* Pill/panel stay invisible while bee is flying */
#nis-chatbot-root.is-introing .nis-pill,
#nis-chatbot-root.is-introing .nis-panel,
#nis-chatbot-root.is-introing .nis-toast,
#nis-chatbot-root.is-ready.is-introing .nis-pill,
#nis-chatbot-root.is-ready.is-introing .nis-panel,
#nis-chatbot-root.is-ready.is-introing .nis-toast {
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
}

#nis-chatbot-root.is-introing .nis-pill {
  transition: none !important;
  transform: translateX(-50%) scale(0.86);
}

/* Bee flight — branded Bees & Cubs logo */
.nis-bee-flight {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 2147483646;
  width: 96px;
  height: 96px;
  margin: 0;
  padding: 10px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.96);
  box-shadow:
    0 0 0 3px rgba(255, 255, 255, 0.95),
    0 16px 40px rgba(15, 23, 42, 0.28),
    0 0 28px rgba(232, 107, 31, 0.22);
  pointer-events: none;
  display: grid;
  place-items: center;
  line-height: 1;
  will-change: transform, opacity;
  animation: nis-bee-fly 2.15s cubic-bezier(0.4, 0.05, 0.2, 1) forwards;
  box-sizing: border-box;
}

.nis-bee-flight .nis-bee-flight-img,
.nis-bee-flight img {
  display: block;
  width: 72px;
  height: 72px;
  object-fit: contain;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  animation: nis-bee-wiggle 0.28s ease-in-out infinite alternate;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.12));
}

.nis-bee-flight span {
  display: none;
}

@keyframes nis-bee-fly {
  0% {
    opacity: 0;
    transform: translate3d(-12vw, 16vh, 0) rotate(-22deg) scale(0.45);
  }
  6% {
    opacity: 1;
  }
  28% {
    transform: translate3d(18vw, 30vh, 0) rotate(16deg) scale(1.15);
  }
  50% {
    transform: translate3d(72vw, 42vh, 0) rotate(-12deg) scale(1.05);
  }
  72% {
    transform: translate3d(38vw, 66vh, 0) rotate(10deg) scale(1);
  }
  88% {
    opacity: 1;
    transform: translate3d(calc(50vw - 44px), calc(84vh - 44px), 0) rotate(0deg) scale(0.85);
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(50vw - 44px), calc(84vh - 44px), 0) rotate(0deg) scale(0.2);
  }
}

@keyframes nis-bee-wiggle {
  from { transform: translateY(-4px) rotate(-10deg) scale(1.05); }
  to { transform: translateY(4px) rotate(10deg) scale(1.05); }
}

#nis-chatbot-root.is-pill-pop .nis-pill {
  animation: nis-pill-pop 0.55s cubic-bezier(0.22, 1.2, 0.36, 1) both;
}

@keyframes nis-pill-pop {
  0% {
    opacity: 0;
    transform: translateX(-50%) scale(0.72);
  }
  100% {
    opacity: 1;
    transform: translateX(-50%) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .nis-bee-flight,
  #nis-chatbot-root.is-pill-pop .nis-pill {
    animation: none !important;
  }
}

@media (max-width: 640px) {
  .nis-bee-flight {
    width: 72px;
    height: 72px;
    padding: 8px;
  }
  .nis-bee-flight .nis-bee-flight-img,
  .nis-bee-flight img {
    width: 52px;
    height: 52px;
  }
  @keyframes nis-bee-fly {
    0% {
      opacity: 0;
      transform: translate3d(-8vw, 20vh, 0) rotate(-18deg) scale(0.5);
    }
    8% { opacity: 1; }
    35% {
      transform: translate3d(55vw, 38vh, 0) rotate(12deg) scale(1.05);
    }
    70% {
      transform: translate3d(28vw, 62vh, 0) rotate(-8deg) scale(0.95);
    }
    100% {
      opacity: 0;
      transform: translate3d(calc(50vw - 32px), calc(100dvh - 96px), 0) scale(0.2);
    }
  }
}

#nis-chatbot-root *,
#nis-chatbot-root *::before,
#nis-chatbot-root *::after {
  box-sizing: border-box;
}

#nis-chatbot-root button {
  font-family: inherit;
  -webkit-tap-highlight-color: transparent;
}

#nis-chatbot-root button:focus-visible,
#nis-chatbot-root input:focus-visible {
  outline: 2px solid rgba(232, 107, 31, 0.45);
  outline-offset: 2px;
}

/* ——— Thin modern scrollbar (no OS arrow buttons) ——— */
#nis-chatbot-root .nis-messages {
  scrollbar-width: thin;
  scrollbar-color: rgba(30, 41, 59, 0.28) transparent;
}

#nis-chatbot-root .nis-messages::-webkit-scrollbar {
  width: 5px;
}

#nis-chatbot-root .nis-messages::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

#nis-chatbot-root .nis-messages::-webkit-scrollbar-track {
  background: transparent;
  margin: 6px 0;
}

#nis-chatbot-root .nis-messages::-webkit-scrollbar-thumb {
  background: rgba(30, 41, 59, 0.22);
  border-radius: 999px;
}

#nis-chatbot-root .nis-messages::-webkit-scrollbar-thumb:hover {
  background: rgba(30, 41, 59, 0.38);
}

#nis-chatbot-root .nis-messages::-webkit-scrollbar-corner {
  background: transparent;
}

/* ——— Cookie ——— */
#nis-chatbot-root .nis-cookie {
  position: fixed;
  left: 50%;
  bottom: max(16px, env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%) translateY(12px);
  width: min(460px, calc(100vw - 28px));
  max-height: min(78vh, calc(100dvh - 28px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 2147483010;
  padding: 20px 22px 18px;
  border-radius: var(--radius);
  background: var(--frost-strong);
  border: 1px solid rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
  backdrop-filter: blur(22px) saturate(1.15);
  -webkit-backdrop-filter: blur(22px) saturate(1.15);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.35s ease;
}

#nis-chatbot-root.is-cookie .nis-cookie {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

#nis-chatbot-root.is-cookie .nis-toast,
#nis-chatbot-root.is-cookie .nis-panel,
#nis-chatbot-root.is-cookie .nis-pill {
  opacity: 0 !important;
  pointer-events: none !important;
  visibility: hidden;
}

#nis-chatbot-root .nis-cookie h3 {
  margin: 0 0 6px;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

#nis-chatbot-root .nis-cookie-copy {
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 500;
  flex: 0 0 auto;
}

#nis-chatbot-root .nis-policy-toggle {
  display: inline;
  margin: 0;
  padding: 0;
  border: 0;
  background: none;
  color: var(--accent);
  font: inherit;
  font-size: inherit;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  cursor: pointer;
}

#nis-chatbot-root .nis-policy-toggle::after { content: none; }

#nis-chatbot-root .nis-policy-sheet {
  flex: 1 1 auto;
  min-height: 0;
  max-height: min(36vh, 280px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: contain;
  margin: 0 0 12px;
  padding: 14px 16px 16px;
  border-radius: 14px;
  background: #fff;
  border: 1px solid var(--line);
}

#nis-chatbot-root .nis-policy-sheet[hidden] { display: none; }

#nis-chatbot-root .nis-policy-sheet h4 {
  margin: 0 0 10px;
  font-size: 20px;
  font-weight: 700;
  color: var(--ink);
}

#nis-chatbot-root .nis-policy-sheet h5 {
  margin: 16px 0 8px;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

#nis-chatbot-root .nis-policy-sheet p {
  margin: 0 0 12px;
  font-size: 13px;
  line-height: 1.55;
  color: var(--ink-soft);
  font-weight: 500;
}

#nis-chatbot-root .nis-cookie-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  flex: 0 0 auto;
  margin-top: auto;
}

#nis-chatbot-root .nis-cookie-btn {
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: transform 0.15s ease, filter 0.15s ease;
}

#nis-chatbot-root .nis-cookie-btn:hover { transform: translateY(-1px); }

#nis-chatbot-root .nis-cookie-btn.accept {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 16px rgba(232, 107, 31, 0.28);
  width: 100%;
}

#nis-chatbot-root .nis-cookie-btn.essential {
  display: none !important;
}

/* Intro toast — disabled (pill + panel only) */
#nis-chatbot-root .nis-toast {
  display: none !important;
}

/* ——— Conversation panel (sits fully above the pill) ——— */
#nis-chatbot-root .nis-panel {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: calc(var(--pill-clear) + var(--kb-inset) + var(--pill-h) + var(--panel-gap));
  transform: translateX(-50%) translateY(10px);
  width: var(--rail);
  height: min(520px, calc(100dvh - var(--pill-clear) - var(--kb-inset) - var(--pill-h) - var(--panel-gap) - var(--nav-clear)));
  max-height: calc(100dvh - var(--pill-clear) - var(--kb-inset) - var(--pill-h) - var(--panel-gap) - var(--nav-clear));
  z-index: 2147483004;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(255, 255, 255, 0.85);
  box-shadow:
    0 24px 64px rgba(3, 46, 80, 0.22),
    0 0 0 1px rgba(245, 130, 32, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.28s ease, transform 0.28s ease, bottom 0.2s ease;
}

#nis-chatbot-root .nis-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background:
    radial-gradient(120% 70% at 8% -8%, rgba(245, 130, 32, 0.1), transparent 50%),
    radial-gradient(90% 60% at 100% 0%, rgba(3, 46, 80, 0.06), transparent 48%);
  z-index: 0;
  opacity: 0.55;
}

#nis-chatbot-root.is-open .nis-panel {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

#nis-chatbot-root .nis-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 12px 12px 14px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(255, 255, 255, 0.38));
  border-bottom: 1px solid rgba(3, 46, 80, 0.08);
  flex-shrink: 0;
  position: relative;
  z-index: 20;
  isolation: isolate;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

#nis-chatbot-root .nis-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  pointer-events: none;
}

#nis-chatbot-root .nis-avatar {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  background: #f7fafc;
  display: grid;
  place-items: center;
  border: 1px solid rgba(245, 130, 32, 0.22);
  flex-shrink: 0;
  overflow: visible;
  padding: 4px;
  box-sizing: border-box;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 8px 18px rgba(3, 46, 80, 0.1);
}

#nis-chatbot-root .nis-avatar img,
#nis-chatbot-root .nis-avatar svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  background: transparent;
  filter: none;
}

#nis-chatbot-root .nis-header h2 {
  margin: 0;
  font-family: "Montserrat", "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  letter-spacing: -0.02em;
}

#nis-chatbot-root .nis-header p {
  margin: 2px 0 0;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

#nis-chatbot-root .nis-close {
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 10px;
  background: rgba(30, 41, 59, 0.06);
  color: var(--ink-soft);
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  line-height: 0;
  position: relative;
  z-index: 30;
  pointer-events: auto !important;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}

#nis-chatbot-root.is-busy .nis-close {
  pointer-events: auto !important;
  opacity: 1;
}

#nis-chatbot-root .nis-close svg {
  width: 14px;
  height: 14px;
  fill: currentColor;
  display: block;
}

#nis-chatbot-root .nis-close:hover {
  background: rgba(30, 41, 59, 0.1);
  color: var(--ink);
}

#nis-chatbot-root .nis-messages {
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
  padding: 14px 12px 14px 14px;
  scroll-behavior: auto;
  overscroll-behavior: contain;
  position: relative;
  z-index: 2;
  background: rgba(248, 250, 252, 0.92);
}

#nis-chatbot-root .nis-day-mark {
  text-align: center;
  font-size: 11px;
  color: #64748b;
  margin: 6px 0 12px;
  letter-spacing: 0.02em;
}

#nis-chatbot-root .nis-msg {
  display: flex;
  margin-bottom: 10px;
}

#nis-chatbot-root .nis-msg.user {
  animation: nis-in 0.18s ease;
}

/* Bot answers that replace typing — no fade (avoids flash) */
#nis-chatbot-root .nis-msg.bot.is-settled {
  animation: none;
}

#nis-chatbot-root .nis-msg.is-typing {
  animation: none;
  min-height: 42px;
  align-items: center;
}

@keyframes nis-in {
  from { opacity: 0.65; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

#nis-chatbot-root .nis-msg.bot { justify-content: flex-start; }
#nis-chatbot-root .nis-msg.user { justify-content: flex-end; }

#nis-chatbot-root .nis-bubble {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  font-size: 13.5px;
  line-height: 1.5;
  font-weight: 500;
  white-space: normal;
  word-break: break-word;
}

#nis-chatbot-root .nis-bubble p {
  margin: 0 0 10px;
}

#nis-chatbot-root .nis-bubble p:last-child {
  margin-bottom: 0;
}

#nis-chatbot-root .nis-bubble-lead {
  font-weight: 700;
  font-size: 14.5px;
  color: var(--ink);
  letter-spacing: -0.01em;
}

#nis-chatbot-root .nis-msg.bot .nis-bubble {
  background: #ffffff;
  border: 1px solid rgba(3, 46, 80, 0.1);
  color: var(--ink);
  border-bottom-left-radius: 4px;
  box-shadow: 0 4px 14px rgba(3, 46, 80, 0.06);
}

#nis-chatbot-root .nis-msg.user .nis-bubble {
  background: linear-gradient(135deg, #f58220 0%, #e86b1f 100%);
  color: #fff;
  border-bottom-right-radius: 4px;
  box-shadow: 0 6px 16px rgba(245, 130, 32, 0.32);
}

#nis-chatbot-root .nis-bubble a {
  color: var(--accent);
  font-weight: 700;
}

#nis-chatbot-root .nis-msg.user .nis-bubble a { color: #fff; }

#nis-chatbot-root .nis-voice-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 4px;
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
}

#nis-chatbot-root .nis-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 2px 0 12px;
}

#nis-chatbot-root .nis-chip {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.95);
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  padding: 7px 11px;
  border-radius: 999px;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

#nis-chatbot-root .nis-chip:hover {
  border-color: rgba(232, 107, 31, 0.35);
  color: var(--accent);
  background: var(--accent-soft);
}

#nis-chatbot-root .nis-chip.accent {
  background: var(--accent);
  border-color: transparent;
  color: #fff;
}

#nis-chatbot-root .nis-typing {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 11px 15px 11px 16px;
  background: #fff;
  border-radius: 18px 18px 18px 4px;
  border: 1px solid var(--line);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.06);
}

#nis-chatbot-root .nis-typing span {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #8696a0;
  animation: nis-wa-dot 1.35s infinite ease-in-out both;
}

#nis-chatbot-root .nis-typing span:nth-child(1) { animation-delay: 0s; }
#nis-chatbot-root .nis-typing span:nth-child(2) { animation-delay: 0.18s; }
#nis-chatbot-root .nis-typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes nis-wa-dot {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.35; }
  30% { transform: translateY(-5px); opacity: 1; }
}

#nis-chatbot-root.is-onboarding .nis-pill {
  opacity: 0.92;
}

#nis-chatbot-root.is-onboarding .nis-pill-send,
#nis-chatbot-root.is-onboarding #nis-mic {
  pointer-events: none;
  opacity: 0.55;
}

#nis-chatbot-root .nis-contact-card {
  max-width: 88%;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  font-size: 13px;
  line-height: 1.5;
}

#nis-chatbot-root .nis-contact-card strong {
  display: block;
  margin-bottom: 4px;
  color: var(--ink);
}

#nis-chatbot-root .nis-contact-note {
  margin: 0 0 8px !important;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

#nis-chatbot-root .nis-contact-card p {
  margin: 0 0 4px;
  color: var(--ink-soft);
}

#nis-chatbot-root .nis-media-card {
  width: min(100%, 340px);
  max-width: 92%;
  padding: 6px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

#nis-chatbot-root .nis-video-wrap {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 10px;
  background: #000;
  line-height: 0;
}

#nis-chatbot-root .nis-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
  object-fit: contain;
  background: #000;
}

#nis-chatbot-root .nis-video-expand {
  position: absolute;
  right: 8px;
  top: 8px;
  z-index: 2;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.72);
  color: #fff;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
}

#nis-chatbot-root .nis-video-expand:hover {
  background: rgba(15, 23, 42, 0.9);
}


/* Own expand player — stays above site, no browser F11 fullscreen */
.nis-video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 2147483647;
  background: rgba(15, 23, 42, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
}

.nis-video-lb-frame {
  width: min(960px, 100%);
  aspect-ratio: 16 / 9;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45);
}

.nis-video-lb-player {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
  background: #000;
  border: 0;
}

.nis-video-lb-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  color: #0f172a;
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  z-index: 2;
}

#nis-chatbot-root .nis-video-placeholder {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--ink-soft);
  font-size: 13px;
}

#nis-chatbot-root .nis-video-placeholder span {
  font-size: 22px;
  color: var(--accent);
}

#nis-chatbot-root .nis-reg-card {
  width: min(100%, 340px);
  max-width: 92%;
  padding: 16px 16px 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #fff;
  box-shadow: 0 4px 16px rgba(15, 23, 42, 0.08);
  box-sizing: border-box;
}

#nis-chatbot-root .nis-reg-head {
  margin: 0 0 12px;
}

#nis-chatbot-root .nis-reg-head strong {
  display: block;
  font-size: 14.5px;
  color: var(--ink);
  margin-bottom: 6px;
  line-height: 1.35;
}

#nis-chatbot-root .nis-reg-sub {
  margin: 0;
  font-size: 12px;
  line-height: 1.4;
  color: var(--ink-soft);
  font-weight: 500;
}

#nis-chatbot-root .nis-reg-switch {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: 0 0 14px;
}

#nis-chatbot-root .nis-reg-tab {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 8px;
  border-radius: 10px;
  cursor: pointer;
  line-height: 1.25;
}

#nis-chatbot-root .nis-reg-tab.is-active {
  background: var(--accent-soft);
  border-color: rgba(232, 107, 31, 0.45);
  color: var(--accent);
}

#nis-chatbot-root .nis-reg-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin: 0;
}

#nis-chatbot-root .nis-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-soft);
  margin: 0;
}

#nis-chatbot-root .nis-field > span {
  display: block;
  line-height: 1.3;
  padding: 0 2px;
}

#nis-chatbot-root .nis-field input[type="text"],
#nis-chatbot-root .nis-field input[type="number"],
#nis-chatbot-root .nis-field input[type="tel"] {
  border: 1px solid rgba(30, 41, 59, 0.14);
  border-radius: 10px;
  padding: 11px 12px;
  font: inherit;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink);
  background: #fff;
  box-sizing: border-box;
  width: 100%;
  min-height: 42px;
}

#nis-chatbot-root .nis-field input:focus {
  outline: none;
  border-color: rgba(232, 107, 31, 0.5);
  box-shadow: 0 0 0 3px rgba(232, 107, 31, 0.12);
}

#nis-chatbot-root .nis-gender-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

#nis-chatbot-root .nis-gender-opt {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 8px 10px;
  border: 1px solid rgba(30, 41, 59, 0.14);
  border-radius: 10px;
  background: #fff;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
  box-sizing: border-box;
}

#nis-chatbot-root .nis-gender-opt:has(input:checked) {
  border-color: rgba(232, 107, 31, 0.5);
  background: var(--accent-soft);
  color: var(--accent);
}

#nis-chatbot-root .nis-gender-opt input {
  margin: 0;
  accent-color: var(--accent);
}

#nis-chatbot-root .nis-reg-error {
  margin: 0;
  padding: 8px 10px;
  border-radius: 8px;
  background: #fff1f2;
  color: #be123c;
  font-size: 12px;
  font-weight: 600;
}

#nis-chatbot-root .nis-reg-submit {
  margin-top: 2px;
  border: 0;
  border-radius: 999px;
  padding: 12px 16px;
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 13.5px;
  cursor: pointer;
  width: 100%;
}

#nis-chatbot-root .nis-reg-submit:hover {
  filter: brightness(1.05);
}

@keyframes nis-dot {
  0%, 80%, 100% { opacity: 0.35; transform: none; }
  40% { opacity: 1; transform: translateY(-3px); }
}

/* ——— Input pill ——— */
#nis-chatbot-root .nis-pill {
  position: fixed;
  left: 50%;
  top: auto;
  bottom: calc(var(--pill-clear) + var(--kb-inset));
  transform: translateX(-50%);
  z-index: 2147483005;
  width: var(--rail);
  min-height: var(--pill-h);
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 6px 6px 16px;
  border-radius: 999px;
  background:
    linear-gradient(120deg, rgba(255, 255, 255, 0.78), rgba(234, 230, 193, 0.35) 45%, rgba(255, 255, 255, 0.7)),
    rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow:
    0 14px 36px rgba(3, 46, 80, 0.16),
    inset 0 1px 0 rgba(255, 255, 255, 0.85),
    0 0 0 1px rgba(245, 130, 32, 0.1);
  backdrop-filter: blur(22px) saturate(1.3);
  -webkit-backdrop-filter: blur(22px) saturate(1.3);
  transition: box-shadow 0.2s ease, border-color 0.2s ease, bottom 0.2s ease;
  contain: layout style;
}

#nis-chatbot-root .nis-pill.is-listening {
  border-color: rgba(232, 107, 31, 0.4);
  box-shadow: 0 0 0 3px rgba(232, 107, 31, 0.12), var(--shadow-soft);
}

#nis-chatbot-root .nis-pill.is-continue-mode {
  cursor: pointer;
  border-color: rgba(232, 107, 31, 0.2);
}

#nis-chatbot-root .nis-pill.is-continue-mode input {
  cursor: pointer;
  caret-color: transparent;
}

#nis-chatbot-root .nis-pill input {
  flex: 1;
  border: 0;
  outline: none;
  background: transparent;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  color: var(--ink);
  min-width: 0;
  padding: 8px 0;
  line-height: 1.3;
}

#nis-chatbot-root .nis-pill input::placeholder {
  color: var(--muted);
  font-weight: 500;
}

#nis-chatbot-root .nis-pill-actions {
  display: flex;
  align-items: center;
  gap: 2px;
  flex-shrink: 0;
}

#nis-chatbot-root .nis-icon-btn {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #7b8798;
  cursor: pointer;
  padding: 0;
  display: grid;
  place-items: center;
  line-height: 0;
  transition: background 0.15s ease, color 0.15s ease;
}

#nis-chatbot-root .nis-icon-btn:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

#nis-chatbot-root .nis-icon-btn.is-on {
  background: var(--accent-soft);
  color: var(--accent);
  animation: nis-pulse 1.2s ease infinite;
}

@keyframes nis-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.05); }
}

#nis-chatbot-root .nis-icon-btn svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
  display: block;
}

#nis-chatbot-root .nis-pill-send {
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  flex-shrink: 0;
  padding: 0;
  margin: 0;
  background: var(--accent);
  color: #fff;
  display: grid;
  place-items: center;
  line-height: 0;
  box-shadow: 0 4px 14px rgba(232, 107, 31, 0.32);
  transition: transform 0.15s ease, filter 0.15s ease;
}

#nis-chatbot-root .nis-pill-send:hover {
  transform: scale(1.05);
  filter: brightness(1.05);
}

#nis-chatbot-root .nis-pill-send:active {
  transform: scale(0.98);
}

#nis-chatbot-root .nis-pill-send svg {
  width: 16px;
  height: 16px;
  fill: currentColor;
  display: block;
  /* optical center for up-arrow glyph */
  transform: translateY(-0.5px);
}

@media (max-width: 640px) {
  #nis-chatbot-root {
    --pill-clear: max(12px, env(safe-area-inset-bottom, 0px));
    --rail: calc(100vw - 16px);
    --nav-clear: max(64px, env(safe-area-inset-top, 0px));
    --panel-gap: 14px;
    --pill-h: 54px;
    --radius: 18px;
  }

  #nis-chatbot-root .nis-cookie {
    width: calc(100vw - 16px);
    bottom: max(12px, env(safe-area-inset-bottom, 0px));
    padding: 16px;
    border-radius: 18px;
  }

  #nis-chatbot-root .nis-cookie h3 { font-size: 16px; }
  #nis-chatbot-root .nis-cookie p { font-size: 13px; margin-bottom: 12px; }

  #nis-chatbot-root .nis-cookie-actions {
    flex-direction: column;
  }

  #nis-chatbot-root .nis-cookie-btn {
    width: 100%;
    min-height: 44px;
    padding: 12px 16px;
    font-size: 14px;
  }

  #nis-chatbot-root .nis-panel {
    width: calc(100vw - 16px);
    border-radius: 18px;
    height: min(68dvh, calc(100dvh - var(--pill-clear) - var(--kb-inset) - var(--pill-h) - var(--panel-gap) - var(--nav-clear)));
    max-height: calc(100dvh - var(--pill-clear) - var(--kb-inset) - var(--pill-h) - var(--panel-gap) - var(--nav-clear));
  }

  #nis-chatbot-root .nis-header {
    padding: 10px 10px 10px 12px;
  }

  #nis-chatbot-root .nis-close {
    width: 40px;
    height: 40px;
  }

  #nis-chatbot-root .nis-messages {
    padding: 10px 10px 14px;
  }

  #nis-chatbot-root .nis-bubble {
    font-size: 14px;
    max-width: 92%;
  }

  #nis-chatbot-root .nis-chips {
    gap: 6px;
  }

  #nis-chatbot-root .nis-chip {
    min-height: 36px;
    padding: 8px 12px;
    font-size: 12.5px;
  }

  #nis-chatbot-root .nis-pill {
    width: calc(100vw - 16px);
    padding: 5px 5px 5px 14px;
    /* Sit above typical floating side widgets on phones */
    bottom: calc(var(--pill-clear) + var(--kb-inset) + 8px);
  }

  #nis-chatbot-root .nis-panel {
    bottom: calc(var(--pill-clear) + var(--kb-inset) + var(--pill-h) + var(--panel-gap) + 8px);
  }

  /* 16px prevents iOS auto-zoom on focus */
  #nis-chatbot-root .nis-pill input {
    font-size: 16px;
    padding: 10px 0;
  }

  #nis-chatbot-root .nis-icon-btn,
  #nis-chatbot-root .nis-pill-send {
    width: 42px;
    height: 42px;
  }

  #nis-chatbot-root .nis-icon-btn svg {
    width: 19px;
    height: 19px;
  }

  #nis-chatbot-root .nis-pill-send svg {
    width: 17px;
    height: 17px;
  }

  /* Heavy blur tanks FPS on many phones — solid frost is enough */
  #nis-chatbot-root .nis-panel,
  #nis-chatbot-root .nis-pill,
  #nis-chatbot-root .nis-toast,
  #nis-chatbot-root .nis-cookie {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: rgba(255, 255, 255, 0.97);
  }
}

/* Very small phones */
@media (max-width: 380px) {
  #nis-chatbot-root .nis-header p {
    display: none;
  }
}

/* Liquid glass motion */
@keyframes nis-liquid-shine {
  0%, 100% { background-position: 0% 0%, 100% 0%, 0% 50%; opacity: 0.85; }
  50% { background-position: 0% 0%, 100% 0%, 100% 50%; opacity: 1; }
}

#nis-chatbot-root .nis-panel > * {
  position: relative;
  z-index: 1;
}

#nis-chatbot-root .nis-pill-send {
  background: linear-gradient(135deg, #f58220, #e45a12) !important;
  box-shadow: 0 6px 16px rgba(245, 130, 32, 0.35);
}

#nis-chatbot-root .nis-chip.is-accent,
#nis-chatbot-root .nis-chip[data-accent="1"] {
  background: rgba(245, 130, 32, 0.14);
  border-color: rgba(245, 130, 32, 0.35);
  color: var(--accent-2);
}

