/* Odette Inbound Desk — www.odettecapital.com */
.odi {
  --odi-navy: #0A1830;
  --odi-ink: #1B2433;
  --odi-blue: #2F5D9E;
  --odi-line: #D9DDE3;
  --odi-soft: #F4F5F7;
  --odi-mute: #5B6573;
  --odi-bg: #FFFFFF;
  --odi-serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --odi-sans: "Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  position: fixed; right: 24px; bottom: 24px; z-index: 2147483000;
  font-family: var(--odi-sans); color: var(--odi-ink); font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.odi *, .odi *::before, .odi *::after { box-sizing: border-box; }
.odi [hidden] { display: none !important; }
.odi button { font-family: inherit; cursor: pointer; margin: 0; letter-spacing: normal; text-transform: none; line-height: 1.3; }
.odi button:focus-visible, .odi textarea:focus-visible, .odi input:focus-visible, .odi a:focus-visible { outline: 2px solid var(--odi-blue); outline-offset: 2px; }

/* Launcher */
.odi-launch {
  display: flex; align-items: center; gap: 10px; margin-left: auto;
  background: var(--odi-navy); color: #fff; border: 0; border-radius: 2px;
  padding: 13px 20px; font-size: 15px; font-weight: 600;
  box-shadow: 0 8px 24px rgba(10, 24, 48, .22);
  transition: background-color .15s ease;
}
.odi-launch:hover { background: #13284d; }
.odi.is-open .odi-launch { display: none; }

/* Prompt bubble */
.odi-teaser {
  position: absolute; right: 0; bottom: 60px; width: 290px;
  background: var(--odi-bg); border: 1px solid var(--odi-line); border-left: 3px solid var(--odi-navy);
  box-shadow: 0 10px 30px rgba(10, 24, 48, .14); display: flex; align-items: flex-start;
}
.odi-teaser-body { flex: 1; text-align: left; background: none; border: 0; padding: 14px 4px 14px 16px; color: var(--odi-ink); font-size: 14.5px; line-height: 1.45; }
.odi-teaser-x { background: none; border: 0; color: var(--odi-mute); padding: 12px; }

/* Panel */
.odi-panel {
  position: absolute; right: 0; bottom: 0;
  width: 404px; height: min(640px, calc(100vh - 48px));
  background: var(--odi-bg); border: 1px solid var(--odi-line); border-radius: 2px;
  box-shadow: 0 18px 50px rgba(10, 24, 48, .20);
  display: flex; flex-direction: column; overflow: hidden;
  animation: odi-open .18s ease-out;
}
@keyframes odi-open { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.odi-panel.is-drop { outline: 2px dashed var(--odi-blue); outline-offset: -8px; }

.odi-head { display: flex; align-items: center; gap: 14px; padding: 16px 14px 14px 20px; border-bottom: 1px solid var(--odi-line); background: var(--odi-bg); }
.odi-head-text { flex: 1; min-width: 0; }
.odi-title { font-family: var(--odi-serif); font-size: 19px; font-weight: 600; color: var(--odi-navy); line-height: 1.2; }
.odi-sub { font-size: 12.5px; color: var(--odi-mute); margin-top: 3px; }
.odi-logo { height: 22px; width: auto; display: block; }
.odi-wordmark { font-family: var(--odi-serif); font-weight: 600; font-size: 16px; letter-spacing: .14em; color: var(--odi-navy); }
.odi-icon { background: none; border: 0; color: var(--odi-mute); width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; border-radius: 2px; padding: 0; }
.odi-icon:hover { color: var(--odi-navy); background: var(--odi-soft); }
.odi-icon:disabled { opacity: .4; cursor: default; }

.odi-view { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* Log */
.odi-log { flex: 1; overflow-y: auto; padding: 20px 20px 8px; scroll-behavior: smooth; }
.odi-msg { margin: 0 0 16px; max-width: 100%; overflow-wrap: anywhere; }
.odi-msg p { margin: 0 0 8px; }
.odi-msg p:last-child { margin-bottom: 0; }
.odi-msg ul { margin: 4px 0 8px 18px; padding: 0; }
.odi-msg li { margin: 0 0 3px; }
.odi-bot { color: var(--odi-ink); font-size: 15px; }
.odi-me { margin-left: auto; width: fit-content; max-width: 86%; background: var(--odi-navy); color: #fff; padding: 9px 13px; border-radius: 2px; font-size: 14.5px; }
.odi-in { animation: odi-in .2s ease-out; }
@keyframes odi-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.odi-note { font-size: 13px; color: var(--odi-mute); margin: 0 0 14px; }
.odi-note-err { color: #8A1C1C; }

/* Opening choices: a ruled menu rather than bubbles */
.odi-choices { margin: 2px 0 12px; border-top: 1px solid var(--odi-line); }
.odi-choice {
  display: block; width: 100%; text-align: left; background: none; border: 0; border-bottom: 1px solid var(--odi-line);
  padding: 12px 4px 12px 14px; color: var(--odi-navy); font-size: 15px; font-weight: 600; position: relative;
  transition: background-color .12s ease, padding-left .12s ease;
}
.odi-choice::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; background: var(--odi-line); transition: background-color .12s ease; }
.odi-choice:hover { background: var(--odi-soft); padding-left: 18px; }
.odi-choice:hover::before { background: var(--odi-navy); }

.odi-typing { display: flex; gap: 5px; padding: 4px 0 14px; }
.odi-typing i { width: 6px; height: 6px; background: var(--odi-mute); border-radius: 50%; opacity: .35; animation: odi-dot 1.1s infinite ease-in-out; }
.odi-typing i:nth-child(2) { animation-delay: .15s; }
.odi-typing i:nth-child(3) { animation-delay: .3s; }
@keyframes odi-dot { 0%, 80%, 100% { opacity: .25; } 40% { opacity: .9; } }

/* Attached files */
.odi-tray { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px 20px 0; border-top: 1px solid var(--odi-line); }
.odi-chip-file { display: flex; gap: 8px; align-items: baseline; max-width: 100%; background: var(--odi-soft); border: 1px solid var(--odi-line); padding: 4px 8px; font-size: 12.5px; }
.odi-chip-file.is-err { border-color: #E3B4B4; }
.odi-fname { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 210px; color: var(--odi-ink); }
.odi-fmeta { color: var(--odi-mute); white-space: nowrap; }

/* Composer */
.odi-compose { display: flex; align-items: flex-end; gap: 6px; padding: 10px 12px 10px 10px; border-top: 1px solid var(--odi-line); }
.odi-tray:not([hidden]) + .odi-compose { border-top: 0; }
.odi-input {
  flex: 1; resize: none; border: 1px solid var(--odi-line); border-radius: 2px; background: var(--odi-bg); color: var(--odi-ink);
  font: inherit; font-size: 15px; line-height: 1.4; padding: 8px 10px; min-height: 38px; max-height: 132px; margin: 0; box-shadow: none;
}
.odi-input:focus { border-color: var(--odi-blue); outline: none; }
.odi-send { width: 38px; height: 38px; flex: none; display: inline-flex; align-items: center; justify-content: center; background: var(--odi-navy); color: #fff; border: 0; border-radius: 2px; padding: 0; }
.odi-send:hover { background: #13284d; }
.odi-send:disabled { opacity: .5; cursor: default; }
.odi-file { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* Footer */
.odi-foot { padding: 0 16px 12px; }
.odi-submit-open {
  display: block; width: 100%; margin: 0 0 10px; padding: 10px; font-size: 14.5px; font-weight: 600;
  background: var(--odi-bg); color: var(--odi-navy); border: 1px solid var(--odi-navy); border-radius: 2px;
}
.odi-submit-open.is-ready, .odi-submit-open:hover { background: var(--odi-navy); color: #fff; }
.odi-legal { font-size: 11.5px; color: var(--odi-mute); line-height: 1.4; }
.odi-legal a { color: var(--odi-mute); text-decoration: underline; }

/* Contact form */
.odi-formview { overflow-y: auto; padding: 20px; }
.odi-form-lead { margin: 0 0 16px; font-size: 14.5px; }
.odi-field { display: block; margin: 0 0 12px; }
.odi-field span { display: block; font-size: 13px; font-weight: 600; color: var(--odi-navy); margin-bottom: 4px; }
.odi-field input { width: 100%; border: 1px solid var(--odi-line); border-radius: 2px; padding: 9px 10px; font: inherit; font-size: 15px; color: var(--odi-ink); background: var(--odi-bg); margin: 0; box-shadow: none; }
.odi-field input:focus { border-color: var(--odi-blue); outline: none; }
.odi-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.odi-form-err { color: #8A1C1C; font-size: 13px; min-height: 18px; margin: 2px 0 8px; }
.odi-form-actions { display: flex; gap: 10px; justify-content: space-between; align-items: center; }
.odi-primary { background: var(--odi-navy); color: #fff; border: 0; border-radius: 2px; padding: 11px 18px; font-size: 14.5px; font-weight: 600; }
.odi-primary:disabled { opacity: .6; cursor: default; }
.odi-back { background: none; border: 0; color: var(--odi-blue); font-size: 14px; padding: 8px 0; text-decoration: underline; text-underline-offset: 3px; }

/* Confirmation */
.odi-done { justify-content: center; }
.odi-done-inner { padding: 28px; }
.odi-done-title { font-family: var(--odi-serif); font-size: 26px; font-weight: 600; color: var(--odi-navy); padding-bottom: 10px; margin-bottom: 14px; border-bottom: 1px solid var(--odi-line); }
.odi-done-inner p { margin: 0 0 18px; font-size: 15px; }

/* Busy */
.odi-panel.is-busy .odi-choice { pointer-events: none; opacity: .6; }

/* Mobile: full screen */
@media (max-width: 560px) {
  .odi { right: 14px; bottom: 14px; }
  .odi-teaser { width: calc(100vw - 28px); }
  .odi.is-open { inset: 0; right: 0; bottom: 0; }
  .odi-panel { position: fixed; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 0; padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
  .odi-input { font-size: 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .odi-panel, .odi-in, .odi-typing i { animation: none; }
  .odi-choice, .odi-launch { transition: none; }
  .odi-log { scroll-behavior: auto; }
}

/* Dark mode (WP Dark Mode toggle, or the visitor's system setting where the site follows it) */
html.wp-dark-mode-active .odi,
html[data-wp-dark-mode-active] .odi {
  --odi-navy: #C9D6EE;
  --odi-ink: #E6E9EE;
  --odi-blue: #8FB2E8;
  --odi-line: #2A3448;
  --odi-soft: #172033;
  --odi-mute: #9AA4B2;
  --odi-bg: #0E1626;
}
html.wp-dark-mode-active .odi-launch, html[data-wp-dark-mode-active] .odi-launch,
html.wp-dark-mode-active .odi-send, html[data-wp-dark-mode-active] .odi-send,
html.wp-dark-mode-active .odi-primary, html[data-wp-dark-mode-active] .odi-primary { background: #2F5D9E; color: #fff; }
html.wp-dark-mode-active .odi-me, html[data-wp-dark-mode-active] .odi-me { background: #1E3A66; color: #fff; }
html.wp-dark-mode-active .odi-submit-open.is-ready, html[data-wp-dark-mode-active] .odi-submit-open.is-ready,
html.wp-dark-mode-active .odi-submit-open:hover, html[data-wp-dark-mode-active] .odi-submit-open:hover { background: #2F5D9E; border-color: #2F5D9E; color: #fff; }
