/*
 * Otto widget styling. Charcoal to match the site's existing pill CTAs
 * (see .oe-audit / bg-jet buttons), Basis Grotesque Pro type, pill radius
 * for the launcher and the same rounded-corner language as the site's
 * cards for the panel. Scoped under .otto-widget so it never leaks into
 * or picks up rules from the rest of the page.
 */
.otto-widget {
  font-family: 'basisGrotesque', sans-serif;
}

.otto-widget__launcher {
  position: fixed;
  right: 42px; /* 10px inside the team image edge (32px gutter) */
  bottom: 34px; /* 10px inside the image bottom (24px) */
  z-index: 2147483000;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.25rem;
  border: none;
  border-radius: 9999px;
  background: #20201e;
  color: #fff;
  font-family: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
  transition: transform 0.35s cubic-bezier(0.2, 0.65, 0.3, 1), opacity 0.35s ease, background 0.15s ease;
}
/* Lifted: clears the footer's social icons at the very bottom of the page (see otto-widget.js). */
.otto-widget[data-otto-lifted] .otto-widget__launcher {
  transform: translateY(calc(-1 * var(--otto-lift, 30px)));
}
/* Parked: hidden until the visitor has scrolled past the team section (see otto-widget.js). */
.otto-widget[data-otto-parked] .otto-widget__launcher {
  opacity: 0;
  transform: translateY(12px);
  pointer-events: none;
}
.otto-widget__launcher:hover {
  background: #000;
  transform: translateY(-1px);
}
.otto-widget__launcher:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
  box-shadow: 0 0 0 4px rgba(32, 32, 30, 0.4);
}
.otto-widget__launcher-dot {
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 9999px;
  background: #dffe67;
  flex-shrink: 0;
}
.otto-widget[data-open] .otto-widget__launcher {
  display: none;
}

.otto-widget__backdrop {
  position: fixed;
  inset: 0;
  z-index: 2147482998;
  background: rgba(20, 20, 18, 0.32);
}

.otto-widget__panel {
  position: fixed;
  z-index: 2147482999;
  right: 1.25rem;
  bottom: 1.25rem;
  width: min(23.75rem, calc(100vw - 2rem));
  height: min(38rem, calc(100vh - 2.5rem));
  max-height: calc(100vh - 2.5rem);
  display: flex;
  flex-direction: column;
  background: #fff;
  color: #20201e;
  border-radius: 1.25rem;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.24);
  overflow: hidden;
}

.otto-widget__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 1.125rem 1.25rem 0.875rem;
  border-bottom: 1px solid rgba(32, 32, 30, 0.08);
  flex-shrink: 0;
}
.otto-widget__title {
  margin: 0;
  font-size: 1.0625rem;
  font-weight: 700;
  color: #20201e;
}
.otto-widget__subtitle {
  margin: 0.125rem 0 0;
  font-size: 0.8125rem;
  color: #707070;
}
.otto-widget__expand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  margin-right: 0.25rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #20201e;
  cursor: pointer;
}
.otto-widget__expand svg { width: 1.125rem; height: 1.125rem; }
.otto-widget__expand:hover { background: #f2f2ee; }
.otto-widget__expand:focus-visible { outline: 2px solid #20201e; outline-offset: 2px; }
.otto-widget__expand .otto-widget__expand-icon-close { display: none; }
.otto-widget[data-expanded] .otto-widget__expand .otto-widget__expand-icon-open { display: none; }
.otto-widget[data-expanded] .otto-widget__expand .otto-widget__expand-icon-close { display: inline; }

/* Expanded: a half-page drawer down the right side with a soft shadow and larger type. */
.otto-widget[data-expanded] .otto-widget__panel {
  top: 0;
  right: 0;
  bottom: 0;
  height: 100vh;
  height: 100dvh;
  max-height: none;
  width: min(50vw, 46rem);
  min-width: min(30rem, 100vw);
  border-radius: 0;
  box-shadow: -16px 0 56px rgba(0, 0, 0, 0.14);
}
.otto-widget[data-expanded] .otto-widget__header { padding: 1.5rem 2rem; }
.otto-widget[data-expanded] .otto-widget__title { font-size: 1.5rem; }
.otto-widget[data-expanded] .otto-widget__subtitle { font-size: 1rem; }
.otto-widget[data-expanded] .otto-widget__transcript { padding: 1.5rem 2rem; gap: 1rem; }
.otto-widget[data-expanded] .otto-widget__message { max-width: 78%; font-size: 1.125rem; line-height: 1.55; padding: 0.875rem 1.125rem; border-radius: 1.25rem; }
.otto-widget[data-expanded] .otto-widget__starters { padding: 0 2rem 1rem; }
.otto-widget[data-expanded] .otto-widget__starter { font-size: 1rem; }
.otto-widget[data-expanded] .otto-widget__input { font-size: 1.125rem; min-height: 3.25rem; padding: 0.875rem 1.125rem; }
.otto-widget[data-expanded] .otto-widget__footer { padding: 0.75rem 2rem 1.25rem; font-size: 0.875rem; }
@media (prefers-reduced-motion: no-preference) {
  .otto-widget__panel { transition: width 0.25s ease, height 0.25s ease, border-radius 0.25s ease, box-shadow 0.25s ease; }
}
@media (max-width: 40rem) {
  .otto-widget[data-expanded] .otto-widget__panel { width: 100%; min-width: 0; }
  .otto-widget__expand { display: none; }
}

.otto-widget__close {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border: none;
  border-radius: 9999px;
  background: transparent;
  color: #707070;
  cursor: pointer;
}
.otto-widget__close svg {
  width: 1rem;
  height: 1rem;
}
.otto-widget__close:hover {
  background: rgba(32, 32, 30, 0.06);
  color: #20201e;
}

.otto-widget__transcript {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto;
  padding: 1rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.625rem;
}

.otto-widget__message {
  max-width: 86%;
  padding: 0.625rem 0.875rem;
  border-radius: 1rem;
  font-size: 0.875rem;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: break-word;
}
.otto-widget__message--user {
  align-self: flex-end;
  background: #20201e;
  color: #fff;
  border-bottom-right-radius: 0.375rem;
}
.otto-widget__message--assistant {
  align-self: flex-start;
  background: #f2f2ee;
  color: #20201e;
  border-bottom-left-radius: 0.375rem;
}

.otto-widget__starters {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0 1.25rem 0.75rem;
  flex-shrink: 0;
}
.otto-widget[data-has-messages] .otto-widget__starters,
.otto-widget[data-lead-captured] .otto-widget__starters {
  display: none;
}

.otto-widget__lead-confirm {
  align-self: center;
  max-width: 92%;
  padding: 0.5rem 0.875rem;
  border-radius: 0.75rem;
  background: #f2f2ee;
  color: #4a4a42;
  font-size: 0.75rem;
  line-height: 1.4;
  text-align: center;
}

.otto-widget__hint {
  margin: 0;
  padding: 0 1.25rem 0.75rem;
  font-size: 0.75rem;
  color: #707070;
  flex-shrink: 0;
}
.otto-widget:not([data-lead-captured]) .otto-widget__hint {
  display: none;
}
.otto-widget__starters-label {
  margin: 0 0 0.125rem;
  font-size: 0.75rem;
  font-weight: 500;
  color: #707070;
}
.otto-widget__starter {
  text-align: left;
  padding: 0.625rem 0.875rem;
  border: 1px solid rgba(32, 32, 30, 0.12);
  border-radius: 0.875rem;
  background: #fff;
  color: #20201e;
  font-family: inherit;
  font-size: 0.8125rem;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.otto-widget__starter:hover {
  background: #f2f2ee;
  border-color: rgba(32, 32, 30, 0.24);
}

.otto-widget__typing {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0 1.25rem 0.5rem;
  flex-shrink: 0;
}
.otto-widget__typing span {
  width: 0.375rem;
  height: 0.375rem;
  border-radius: 9999px;
  background: #b7b7ae;
  animation: otto-typing-bounce 1s infinite ease-in-out;
}
.otto-widget__typing span:nth-child(2) { animation-delay: 0.15s; }
.otto-widget__typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes otto-typing-bounce {
  0%, 80%, 100% { transform: translateY(0); opacity: 0.5; }
  40% { transform: translateY(-3px); opacity: 1; }
}

.otto-widget__form {
  display: flex;
  align-items: flex-end;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  border-top: 1px solid rgba(32, 32, 30, 0.08);
  flex-shrink: 0;
}
.otto-widget__input {
  flex: 1 1 auto;
  min-height: 2.5rem;
  max-height: 6rem;
  resize: none;
  border: 1px solid rgba(32, 32, 30, 0.16);
  border-radius: 1rem;
  padding: 0.625rem 0.875rem;
  font-family: inherit;
  font-size: 0.875rem;
  color: #20201e;
  background: #fff;
}
.otto-widget__input:focus {
  outline: none;
  border-color: #20201e;
}
.otto-widget__send {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 9999px;
  background: #20201e;
  color: #fff;
  cursor: pointer;
  transition: opacity 0.15s ease;
}
.otto-widget__send svg {
  width: 1rem;
  height: 1rem;
}
.otto-widget__send:disabled {
  opacity: 0.35;
  cursor: default;
}
.otto-widget__send:not(:disabled):hover {
  background: #000;
}

.otto-widget__footer {
  margin: 0;
  padding: 0.625rem 1.25rem 0.875rem;
  font-size: 0.6875rem;
  line-height: 1.4;
  color: #8a8a80;
  flex-shrink: 0;
}
.otto-widget__footer a {
  color: #20201e;
  text-decoration: underline;
}

.otto-widget__sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (max-width: 40rem) {
  .otto-widget__panel {
    right: 0;
    bottom: 0;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    max-height: none;
    border-radius: 0;
  }
  .otto-widget__launcher {
    right: 1rem;
    bottom: 1rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .otto-widget__launcher,
  .otto-widget__starter,
  .otto-widget__send {
    transition: none;
  }
  .otto-widget__typing span {
    animation: none;
    opacity: 0.8;
  }
}

/* Launcher offsets are tuned to sit 10px inside the home page team image: do not change without re-measuring. */
@media (max-width: 767px) { .otto-widget__launcher { right: 26px; bottom: 34px; } }

/* Header buttons cluster at the right; the heading takes the remaining width. */
.otto-widget__heading { flex: 1 1 auto; min-width: 0; }

/* Status dot in the panel header, matching the launcher. */
.otto-widget__title { display: inline-flex; align-items: center; gap: 0.5rem; }
.otto-widget__status-dot { width: 0.5rem; height: 0.5rem; border-radius: 9999px; background: #dffe67; flex-shrink: 0; }
.otto-widget[data-expanded] .otto-widget__status-dot { width: 0.625rem; height: 0.625rem; }
