/* OWRA M&C chat assistant. Uses the tokens from site.css. */
.oc-fab {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 40;
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 20px 13px 16px; border-radius: 999px; cursor: pointer;
  background: var(--gold-grad); color: #1a120a; border: 0;
  font-family: var(--sans); font-weight: 500; font-size: 0.8rem; letter-spacing: 0.14em; text-transform: uppercase;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(236, 215, 168, 0.35);
  transition: transform 0.25s var(--ease), opacity 0.25s, box-shadow 0.25s;
}
.oc-fab:hover { transform: translateY(-2px); box-shadow: 0 14px 36px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(236, 215, 168, 0.6); }
.oc-fab svg { width: 20px; height: 20px; flex: none; }
.oc-fab.is-hidden { opacity: 0; pointer-events: none; transform: translateY(8px) scale(0.96); }
.oc-fab .oc-dot { position: absolute; top: 6px; right: 8px; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 2px #e9cf9a; }

.oc-panel {
  position: fixed; right: max(16px, env(safe-area-inset-right)); bottom: max(16px, env(safe-area-inset-bottom)); z-index: 41;
  width: min(392px, calc(100vw - 32px)); height: min(600px, calc(100dvh - 32px));
  display: flex; flex-direction: column; overflow: hidden;
  background: var(--ink-2); color: var(--ivory);
  border: 1px solid var(--line); border-radius: 18px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.65);
  opacity: 0; visibility: hidden; transform: translateY(16px) scale(0.98); transform-origin: bottom right;
  transition: opacity 0.25s var(--ease), transform 0.3s var(--ease), visibility 0s 0.3s;
}
.oc-panel.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }

.oc-head { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line-soft); background: var(--ink-3); }
.oc-avatar { width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; background: var(--gold-grad); color: #1a120a; font-family: var(--serif); font-weight: 600; font-size: 1.05rem; letter-spacing: 0.04em; }
.oc-title { flex: 1; min-width: 0; }
.oc-title b { display: block; font-family: var(--serif); font-size: 1.15rem; font-weight: 500; letter-spacing: 0.06em; line-height: 1.1; }
.oc-title span { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 3px; }
.oc-title span::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #3ddc84; margin-right: 6px; vertical-align: 1px; }
.oc-x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line-soft); background: transparent; color: var(--muted); cursor: pointer; display: grid; place-items: center; transition: color 0.2s, border-color 0.2s; }
.oc-x:hover { color: var(--gold-hi); border-color: var(--line); }
.oc-x svg { width: 14px; height: 14px; }

.oc-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; overscroll-behavior: contain; scroll-behavior: smooth; }
.oc-msg { max-width: 86%; padding: 10px 14px; border-radius: 14px; font-size: 0.92rem; line-height: 1.5; white-space: pre-wrap; overflow-wrap: anywhere; }
.oc-bot { align-self: flex-start; background: var(--ink-3); border: 1px solid var(--line-soft); border-bottom-left-radius: 4px; }
.oc-you { align-self: flex-end; background: var(--gold-grad); color: #1a120a; border-bottom-right-radius: 4px; font-weight: 400; }
.oc-typing { display: inline-flex; gap: 5px; padding: 14px 16px; }
.oc-typing i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); opacity: 0.35; animation: oc-b 1.1s infinite; }
.oc-typing i:nth-child(2) { animation-delay: 0.15s; } .oc-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes oc-b { 0%, 60%, 100% { opacity: 0.3; transform: none; } 30% { opacity: 1; transform: translateY(-3px); } }

.oc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 2px; }
.oc-chip { padding: 8px 13px; border-radius: 999px; font-size: 0.8rem; cursor: pointer; background: transparent; color: var(--gold-hi); border: 1px solid var(--line); transition: background 0.2s, border-color 0.2s; text-align: left; }
.oc-chip:hover { background: rgba(201, 161, 91, 0.12); border-color: var(--gold); }

.oc-card { align-self: stretch; padding: 14px; border-radius: 14px; background: rgba(201, 161, 91, 0.07); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 10px; }
.oc-card p { font-size: 0.82rem; color: var(--muted); line-height: 1.45; }
.oc-card p b { color: var(--ivory); font-weight: 500; }
.oc-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.oc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 12px; border-radius: 10px; font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 500; cursor: pointer; border: 1px solid var(--line); background: transparent; color: var(--gold-hi); text-align: center; transition: background 0.2s; }
.oc-btn:hover { background: rgba(201, 161, 91, 0.14); }
.oc-btn.is-primary { background: var(--gold-grad); color: #1a120a; border-color: transparent; }
.oc-btn svg { width: 16px; height: 16px; flex: none; }
.oc-card input { width: 100%; padding: 10px 12px; border-radius: 9px; background: var(--ink); border: 1px solid var(--line-soft); color: var(--ivory); font: inherit; font-size: 0.88rem; }
.oc-card input:focus { outline: none; border-color: var(--gold); }
.oc-card .oc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.oc-err { color: #ff9a8a !important; }
.oc-sub { font-size: 0.78rem; color: var(--muted); text-align: center; }
.oc-sub a { color: var(--gold-hi); text-decoration: underline; text-underline-offset: 3px; }

.oc-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line-soft); background: var(--ink-3); }
.oc-form input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 999px; background: var(--ink); border: 1px solid var(--line-soft); color: var(--ivory); font: inherit; font-size: 16px; }
.oc-form input:focus { outline: none; border-color: var(--gold); }
.oc-form button { width: 44px; height: 44px; flex: none; border-radius: 50%; border: 0; cursor: pointer; background: var(--gold-grad); color: #1a120a; display: grid; place-items: center; }
.oc-form button:disabled { opacity: 0.4; cursor: default; }
.oc-form button svg { width: 18px; height: 18px; }
.oc-note { text-align: center; font-size: 0.68rem; color: var(--muted); padding: 0 12px 10px; background: var(--ink-3); }

@media (max-width: 560px) {
  .oc-panel { right: 0; bottom: 0; left: 0; width: 100%; height: min(86dvh, 640px); border-radius: 18px 18px 0 0; border-bottom: 0; transform-origin: bottom center; }
  .oc-fab { padding: 13px 16px; }
  .oc-fab .oc-label { display: none; }
  .oc-fab { width: 54px; height: 54px; padding: 0; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
  .oc-panel, .oc-fab { transition: none; }
  .oc-typing i { animation: none; opacity: 0.7; }
  .oc-body { scroll-behavior: auto; }
}
