/* OPTINEX first-party live chat — namespaced so site.css homepage work can land in parallel. */
.ox-chat { position: relative; z-index: 940; }
.ox-chat-fab {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
}
.ox-chat-fab-label {
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  color: #0b1b3a;
  background: #fff;
  border: 1px solid rgba(11, 27, 58, 0.12);
  border-radius: 999px;
  padding: 0.38rem 0.75rem;
  box-shadow: 0 8px 24px rgba(11, 27, 58, 0.12);
}
.ox-chat-fab-bubble {
  width: 3.75rem;
  height: 3.75rem;
  border-radius: 50%;
  background: #1e4ed8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 4px rgba(30, 78, 216, 0.18), 0 14px 32px rgba(15, 45, 120, 0.45);
  transition: transform 0.2s ease, background 0.2s ease;
}
.ox-chat-fab-bubble svg { width: 26px; height: 26px; color: #fff; }
.ox-chat-fab:hover .ox-chat-fab-bubble,
.ox-chat-fab:focus-visible .ox-chat-fab-bubble {
  background: #163ea8;
  transform: scale(1.06);
}
.ox-chat-fab[aria-expanded="true"] { display: none; }
.ox-chat-unread {
  position: absolute;
  top: -2px;
  right: -2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e11d48;
  border: 2px solid #fff;
}
.ox-chat-panel {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 10000;
  width: min(24.5rem, calc(100vw - 1.5rem));
  max-height: min(40rem, calc(100vh - 2rem));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(11, 27, 58, 0.12);
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(11, 27, 58, 0.22);
  color: #0b1b3a;
}
.ox-chat-head {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1rem 1rem 0.85rem;
  background: linear-gradient(180deg, #0b1b3a 0%, #163ea8 100%);
  color: #fff;
}
.ox-chat-kicker { margin: 0; font-weight: 700; letter-spacing: 0.02em; }
.ox-chat-status { margin: 0.15rem 0 0; font-size: 0.78rem; opacity: 0.9; }
.ox-chat-close {
  width: 2rem; height: 2rem; border-radius: 50%;
  border: 1px solid rgba(255,255,255,0.25);
  background: transparent; color: #fff;
  display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}
.ox-chat-close svg { width: 16px; height: 16px; color: #fff; }
.ox-chat-body { padding: 1rem; overflow: auto; }
.ox-chat-copy, .ox-chat-offline { font-size: 0.82rem; color: #4b5a78; margin: 0 0 0.85rem; }
.ox-chat-offline { background: #eef2ff; border-radius: 10px; padding: 0.65rem 0.75rem; color: #163ea8; }
.ox-chat-field { margin-bottom: 0.7rem; }
.ox-chat-field label { display: block; font-size: 0.78rem; font-weight: 600; margin-bottom: 0.25rem; }
.ox-chat-field label span { font-weight: 500; color: #6b7a96; }
.ox-chat-field input, .ox-chat-field select, .ox-chat-field textarea {
  width: 100%; border: 1px solid rgba(11, 27, 58, 0.16); border-radius: 10px;
  padding: 0.5rem 0.65rem; font: inherit; color: #0b1b3a; background: #fff;
}
.ox-chat-consent { display: flex; gap: 0.5rem; align-items: flex-start; font-size: 0.78rem; margin: 0.6rem 0 0.85rem; }
.ox-chat-consent a { color: #1e4ed8; }
.ox-chat-submit, .ox-chat-send {
  background: #1e4ed8; color: #fff; border: 0; border-radius: 999px;
  padding: 0.55rem 1rem; font-weight: 700; cursor: pointer; width: 100%;
}
.ox-chat-submit:disabled, .ox-chat-send:disabled { opacity: 0.6; }
.ox-chat-error { color: #b42318; font-size: 0.78rem; min-height: 1em; margin: 0.4rem 0 0; }
.ox-chat-thread { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ox-chat-thread-meta {
  display: flex; justify-content: space-between; gap: 0.5rem;
  padding: 0.45rem 1rem; font-size: 0.75rem; color: #4b5a78; border-bottom: 1px solid rgba(11,27,58,0.08);
}
.ox-chat-messages { flex: 1; overflow: auto; padding: 0.85rem 1rem; display: flex; flex-direction: column; gap: 0.55rem; }
.ox-chat-bubble { max-width: 88%; padding: 0.55rem 0.7rem; border-radius: 14px; font-size: 0.86rem; }
.ox-chat-bubble.customer { align-self: flex-end; background: #1e4ed8; color: #fff; }
.ox-chat-bubble.agent, .ox-chat-bubble.system { align-self: flex-start; background: #eef2ff; color: #0b1b3a; }
.ox-chat-bubble .meta { display: block; font-size: 0.68rem; opacity: 0.75; margin-bottom: 0.15rem; }
.ox-chat-bubble img { max-width: 100%; border-radius: 8px; display: block; margin-top: 0.35rem; }
.ox-chat-bubble a { color: inherit; text-decoration: underline; }
.ox-chat-typing { font-size: 0.75rem; color: #4b5a78; padding: 0 1rem; margin: 0; }
.ox-chat-composer { display: grid; grid-template-columns: auto 1fr auto; gap: 0.4rem; padding: 0.7rem 0.85rem 0.85rem; border-top: 1px solid rgba(11,27,58,0.08); }
.ox-chat-composer textarea { border: 1px solid rgba(11,27,58,0.16); border-radius: 12px; padding: 0.45rem 0.55rem; resize: none; font: inherit; }
.ox-chat-attach, .ox-chat-send { width: auto; padding: 0.45rem 0.7rem; border-radius: 12px; }
.ox-chat-attach { background: #eef2ff; color: #163ea8; border: 0; font-weight: 700; cursor: pointer; }
.ox-chat-pending { padding: 0 1rem 0.5rem; font-size: 0.75rem; color: #4b5a78; }
.ox-chat-pending button { border: 0; background: transparent; color: #b42318; cursor: pointer; }
@media (max-width: 575.98px) {
  .ox-chat-fab-label { display: none; }
  .ox-chat-fab, .ox-chat-panel { right: 0.85rem; bottom: 0.85rem; }
}
