/* OBMS Chatbot – Amba v2.9.2 */
:root { --obmsc-accent: #C0392B; }

/* ── FAB: circular AMBA AI logo inside a chat bubble with a tail ── */
.obmsc-fab {
  position: fixed;
  bottom: 18px;
  z-index: 99999;
  width: 82px;
  height: 90px;
  min-width: 0;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  cursor: pointer;
  display: block;
  overflow: visible;
  line-height: 0;
  animation: none;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.obmsc-fab-shape {
  position: relative;
  display: block;
  width: 72px;
  height: 72px;
  margin: 0 auto;
  filter: drop-shadow(0 8px 18px rgba(176, 16, 28, 0.42));
}
.obmsc-fab-logo {
  position: relative;
  z-index: 2;
  width: 72px !important;
  height: 72px !important;
  border-radius: 50%;
  object-fit: cover;
  object-position: center;
  display: block;
  background: #c4121a;
  box-shadow: 0 0 0 3px #fff;
  animation: obmsc-pulse 2.8s ease-in-out infinite;
}
.obmsc-fab-tail {
  position: absolute;
  left: 10px;
  bottom: -9px;
  z-index: 1;
  width: 22px;
  height: 18px;
  background: #d91e24;
  clip-path: polygon(18% 0, 100% 8%, 0 100%);
  transform: rotate(-6deg);
  filter: drop-shadow(1px 3px 3px rgba(0,0,0,.18));
}
.obmsc-fab-label { display: none !important; }

@keyframes obmsc-pulse {
  0%,100% { box-shadow: 0 0 0 3px #fff, 0 0 0 0 rgba(217,30,36,0.28); }
  50%      { box-shadow: 0 0 0 3px #fff, 0 0 0 10px rgba(217,30,36,0); }
}
.obmsc-fab:hover { transform: translateY(-3px) scale(1.04); }
.obmsc-fab:hover .obmsc-fab-logo { animation: none; }

/* when open → hide FAB completely */
.obmsc-fab.is-open { opacity: 0; pointer-events: none; transform: scale(0.85); }

/* ── Chat window ── */
.obmsc-win {
  position: fixed;
  bottom: 22px;
  z-index: 99998;
  width: min(370px, calc(100vw - 20px));
  background: #FFFDF8;
  border-radius: 20px;
  border: 1px solid rgba(201, 154, 48, 0.28);
  box-shadow: 0 18px 50px rgba(28,14,6,0.18), 0 2px 8px rgba(0,0,0,0.06);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
  transform: translateY(16px) scale(0.96);
  transition: opacity 0.22s ease, transform 0.22s ease;
  max-height: min(560px, calc(100vh - 40px));
}
.obmsc-win.is-open {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

/* ── Head: dark bar against cream body so the logo reads ── */
.obmsc-head {
  background: linear-gradient(180deg, #2C160A 0%, #1A0C04 100%);
  padding: 12px 14px 12px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-shrink: 0;
  border-bottom: 1px solid rgba(232, 160, 32, 0.38);
}
.obmsc-head-left { display: flex; align-items: center; gap: 11px; }
.obmsc-avatar {
  width: 52px; height: 52px; border-radius: 50%;
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  border: 2px solid #FFF8EE;
  box-shadow: 0 0 0 1.5px rgba(232,160,32,.45), 0 4px 12px rgba(0,0,0,.35);
  overflow: hidden;
  cursor: zoom-in;
  transition: transform 0.25s cubic-bezier(.2,.8,.3,1.4);
}
.obmsc-avatar svg { width: 30px; height: 30px; }
.obmsc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.obmsc-avatar.obmsc-has-custom { background: #fff; }

.obmsc-avatar:hover { transform: scale(1.08); }
.obmsc-avatar.obmsc-zoomed {
  position: fixed;
  top: 50%; left: 50%;
  width: 240px; height: 240px;
  transform: translate(-50%,-50%) scale(1);
  z-index: 100002;
  border-width: 4px;
  box-shadow: 0 20px 70px rgba(0,0,0,0.55);
  cursor: zoom-out;
}
.obmsc-avatar.obmsc-zoomed svg { width: 150px; height: 150px; }
.obmsc-zoom-backdrop {
  position: fixed; inset: 0; z-index: 100001;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(3px);
  opacity: 0; pointer-events: none; transition: opacity 0.25s;
}
.obmsc-zoom-backdrop.show { opacity: 1; pointer-events: auto; }
.obmsc-head-left strong {
  display: block; color: #FFFDF5; font-size: 15px; font-weight: 800;
  font-family: -apple-system, 'Segoe UI', sans-serif; line-height: 1.2;
}
.obmsc-head-left span {
  display: flex; align-items: center; gap: 5px;
  font-size: 11.5px; color: rgba(255, 243, 210, 0.72);
  font-family: -apple-system, sans-serif;
}
.obmsc-online-dot {
  display: inline-block; width: 7px; height: 7px;
  background: #3dcf73; border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 2px rgba(61,207,115,.22);
}
.obmsc-close {
  background: rgba(255,253,245,0.08); border: none;
  color: #F5C842; font-size: 16px; cursor: pointer;
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: background 0.15s, color 0.15s; line-height: 1; flex-shrink: 0;
}
.obmsc-close:hover { background: rgba(255,253,245,0.16); color: #fff; }

/* ── Body ── */
.obmsc-body {
  flex: 1; overflow-y: auto; padding: 14px 14px 8px;
  display: flex; flex-direction: column; gap: 10px;
  scroll-behavior: smooth; background: #FFF8EF;
}
.obmsc-body::-webkit-scrollbar { width: 4px; }
.obmsc-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 4px; }

.obmsc-bubble {
  padding: 10px 14px; border-radius: 16px;
  font-size: 13.5px; line-height: 1.62;
  max-width: 90%; word-break: break-word;
  font-family: -apple-system, 'Segoe UI', sans-serif;
  animation: obmsc-in 0.18s ease;
}
@keyframes obmsc-in {
  from { opacity:0; transform:translateY(7px); }
  to   { opacity:1; transform:translateY(0); }
}
.obmsc-bubble.bot {
  background: #fff; color: #1a1a1a;
  border: 1px solid #ebebeb;
  border-bottom-left-radius: 5px;
  align-self: flex-start;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.obmsc-bubble.bot strong { color: #8B1A12; }
.obmsc-bubble.bot a {
  color: #C0392B;
  font-weight: 700;
  text-decoration: underline;
  word-break: break-word;
}
.obmsc-bubble.bot a:hover { color: #8B1A12; }
.obmsc-bubble.bot p { margin: 0 0 6px; }
.obmsc-bubble.bot p:last-child { margin: 0; }
.obmsc-bubble.user {
  background: #FFF3E4; color: #1C0E06;
  border: 1px solid rgba(201,154,48,.35);
  border-bottom-right-radius: 5px;
  align-self: flex-end;
  box-shadow: 0 1px 4px rgba(28,14,6,0.06);
}

/* Typing indicator */
.obmsc-typing {
  display: flex; gap: 5px; padding: 12px 14px;
  align-items: center; align-self: flex-start;
  background: #fff; border: 1px solid #ebebeb;
  border-radius: 16px; border-bottom-left-radius: 5px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
}
.obmsc-typing span {
  width: 7px; height: 7px; border-radius: 50%; background: #C0392B;
  animation: obmsc-dot 1.2s ease-in-out infinite;
}
.obmsc-typing span:nth-child(2) { animation-delay: 0.16s; }
.obmsc-typing span:nth-child(3) { animation-delay: 0.32s; }
@keyframes obmsc-dot {
  0%,60%,100% { transform:scale(0.75); opacity:0.35; }
  30%          { transform:scale(1.2);  opacity:1; }
}

/* ── Footer input area ── */
.obmsc-foot {
  display: flex; align-items: flex-end; gap: 8px;
  padding: 10px 12px 12px; border-top: 1px solid rgba(201,154,48,.22);
  flex-shrink: 0; background: #FFFDF8;
}
.obmsc-input {
  flex: 1; border: 1.5px solid #e0e0e0; border-radius: 12px;
  padding: 9px 13px; font-size: 13.5px;
  font-family: -apple-system, 'Segoe UI', sans-serif;
  color: #1a1a1a; resize: none; outline: none;
  min-height: 40px; max-height: 100px; line-height: 1.45;
  transition: border-color 0.2s; background: #f8f8f8;
}
.obmsc-input:focus { border-color: var(--obmsc-accent); background: #fff; }
.obmsc-input::placeholder { color: #bbb; }

/* ── SEND BUTTON — arrow always visible ── */
.obmsc-send {
  width: 40px;
  height: 40px;
  min-width: 40px;
  border-radius: 12px;
  background: var(--obmsc-accent);
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  align-self: flex-end;
  transition: transform 0.15s, filter 0.15s;
  box-shadow: 0 2px 8px rgba(192,57,43,0.35);
  padding: 0;
  overflow: visible;
}
.obmsc-send:hover  { filter: brightness(1.12); transform: scale(1.05); }
.obmsc-send:active { transform: scale(0.94); }
.obmsc-send:disabled { opacity: 0.45; cursor: not-allowed; transform: none; }
/* The SVG arrow — always white, never hidden */
.obmsc-send-arrow {
  width: 18px;
  height: 18px;
  display: block;
  pointer-events: none;
  flex-shrink: 0;
}

/* ── Disclaimer bar ── */
.obmsc-hint {
  text-align: center;
  font-size: 10px;
  color: #9a7a55;
  padding: 0 12px 9px;
  font-family: -apple-system, sans-serif;
  background: #FFFDF8;
  flex-shrink: 0;
  line-height: 1.4;
}

/* ── Mobile ── */
@media (max-width: 480px) {
  .obmsc-win { width: calc(100vw - 12px); bottom: 14px; }
  .obmsc-fab { bottom: 14px; }
}

/* ── Mobile ── */
/* ── Follow-up suggestion chips ── */
.obmsc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 4px 0 8px;
  padding: 0 2px;
  animation: obmsc-chips-in .3s ease;
}
@keyframes obmsc-chips-in {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.obmsc-chip {
  background: #FFFDF8;
  border: 1.5px solid rgba(201,154,48,.55);
  color: #8B1A12;
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.3;
  padding: 7px 13px;
  border-radius: 16px;
  cursor: pointer;
  transition: background .18s, color .18s, transform .18s;
  font-family: inherit;
  text-align: left;
}
.obmsc-chip:hover {
  background: #C0392B;
  color: #fff;
  border-color: #C0392B;
  transform: translateY(-1px);
}
.obmsc-chip:active { transform: translateY(0); }
