.repair-chat {
  --repair-chat-teal: #087f80;
  --repair-chat-ink: #18333d;
  --repair-chat-muted: #647782;
  --repair-chat-surface: #ffffff;
  --repair-chat-border: #dce8e9;
  position: fixed;
  z-index: 1040;
  left: max(1rem, env(safe-area-inset-left));
  bottom: max(1rem, env(safe-area-inset-bottom));
  font-family: inherit;
}

.repair-chat-launcher,
.repair-chat-close,
.repair-chat-choice,
.repair-chat-action {
  border: 0;
  font: inherit;
  cursor: pointer;
}

.repair-chat-launcher {
  display: grid;
  width: 3.75rem;
  height: 3.75rem;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: linear-gradient(145deg, #0a9290, #086873);
  box-shadow: 0 0.65rem 1.8rem rgb(9 83 89 / 28%);
  font-size: 1.45rem;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.repair-chat-launcher:hover {
  transform: translateY(-2px);
  box-shadow: 0 0.85rem 2rem rgb(9 83 89 / 34%);
}

.repair-chat-launcher:focus-visible,
.repair-chat button:focus-visible,
.repair-chat input:focus-visible,
.repair-chat select:focus-visible,
.repair-chat textarea:focus-visible {
  outline: 3px solid #e1a82c;
  outline-offset: 3px;
}

.repair-chat-panel {
  position: absolute;
  left: 0;
  bottom: 4.5rem;
  display: flex;
  width: min(23.5rem, calc(100vw - 2rem));
  height: min(39rem, calc(100dvh - 7rem));
  min-height: min(25rem, calc(100dvh - 7rem));
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgb(220 232 233 / 90%);
  border-radius: 1.3rem;
  background: var(--repair-chat-surface);
  box-shadow: 0 1.2rem 3.5rem rgb(15 43 53 / 23%);
  transform: scale(0.12);
  transform-origin: bottom left;
  opacity: 0;
  transition: transform 280ms cubic-bezier(0.2, 0.8, 0.2, 1), opacity 180ms ease;
}

.repair-chat-panel[hidden] {
  display: none;
}

.repair-chat.is-open .repair-chat-panel {
  transform: scale(1);
  opacity: 1;
}

.repair-chat-header {
  display: flex;
  min-height: 4.5rem;
  align-items: center;
  gap: 0.75rem;
  padding: 0.8rem 0.95rem;
  color: #fff;
  background: linear-gradient(110deg, #087f80, #145d6b);
}

.repair-chat-avatar {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  flex: 0 0 auto;
  place-items: center;
  border: 1px solid rgb(255 255 255 / 30%);
  border-radius: 50%;
  background: rgb(255 255 255 / 14%);
  font-size: 1.2rem;
}

.repair-chat-heading {
  min-width: 0;
  flex: 1;
}

.repair-chat-heading h2 {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.repair-chat-heading span {
  display: block;
  margin-top: 0.14rem;
  color: rgb(255 255 255 / 84%);
  font-size: 0.72rem;
}

.repair-chat-online-dot {
  display: inline-block !important;
  width: 0.42rem;
  height: 0.42rem;
  margin-right: 0.25rem;
  border-radius: 50%;
  background: #9df1c7;
  vertical-align: 0.04rem;
}

.repair-chat-close {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: rgb(255 255 255 / 13%);
  font-size: 1.1rem;
}

.repair-chat-close:hover {
  background: rgb(255 255 255 / 24%);
}

.repair-chat-log {
  flex: 1;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1rem 0.85rem 5.5rem;
  background:
    radial-gradient(ellipse at top left, rgb(214 239 237 / 40%), transparent 60%),
    #f3f7f7;
  scroll-behavior: smooth;
}

.repair-chat-message {
  max-width: 94%;
  margin: 0 0 0.8rem;
  animation: repair-chat-message-in 180ms ease-out both;
}

.repair-chat-message--assistant {
  margin-right: auto;
}

.repair-chat-message--user {
  margin-left: auto;
}

.repair-chat-bubble {
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--repair-chat-border);
  border-radius: 1rem 1rem 1rem 0.25rem;
  background: #fff;
  color: var(--repair-chat-ink);
  box-shadow: 0 0.2rem 0.65rem rgb(29 60 67 / 5%);
  font-size: 0.9rem;
  line-height: 1.5;
}

.repair-chat-message--user .repair-chat-bubble {
  border-color: #c5e6df;
  border-radius: 1rem 1rem 0.25rem 1rem;
  background: #e1f4ed;
}

.repair-chat-typing {
  display: flex;
  width: fit-content;
  min-width: 3.7rem;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.8rem 0.9rem;
}

.repair-chat-typing-dot {
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: #81949a;
  animation: repair-chat-typing-pulse 1s infinite ease-in-out;
}

.repair-chat-typing-dot:nth-child(2) {
  animation-delay: 140ms;
}

.repair-chat-typing-dot:nth-child(3) {
  animation-delay: 280ms;
}

.repair-chat-question {
  margin-bottom: 0.65rem;
}

.repair-chat-question p,
.repair-chat-review p {
  margin: 0;
}

.repair-chat-field {
  width: 100%;
  min-height: 2.7rem;
  padding: 0.62rem 0.72rem;
  border: 1px solid #c9d9dc;
  border-radius: 0.65rem;
  background: #fff;
  color: var(--repair-chat-ink);
  font: inherit;
  font-size: 0.9rem;
}

.repair-chat-field::placeholder {
  color: #7b8c93;
}

.repair-chat-field--textarea {
  min-height: 5rem;
  resize: vertical;
}

.repair-chat-choice-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.repair-chat-choice {
  padding: 0.55rem 0.75rem;
  border: 1px solid #b7d9d7;
  border-radius: 999px;
  background: #f7ffff;
  color: #145b61;
  font-size: 0.82rem;
  font-weight: 650;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.repair-chat-choice[aria-pressed="true"] {
  border-color: var(--repair-chat-teal);
  background: var(--repair-chat-teal);
  color: #fff;
}

.repair-chat-date-picker {
  display: grid;
  gap: 0.55rem;
}

.repair-chat-date-caption {
  margin: 0;
  color: var(--repair-chat-muted);
  font-size: 0.76rem;
  font-weight: 650;
}

.repair-chat-date-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.45rem;
}

.repair-chat-date-choice {
  display: grid;
  min-width: 0;
  min-height: 5rem;
  justify-items: center;
  align-content: center;
  gap: 0.1rem;
  padding: 0.45rem 0.2rem;
  border: 1px solid #b7d9d7;
  border-radius: 0.8rem;
  background: #f7ffff;
  color: #145b61;
  cursor: pointer;
  font: inherit;
  transition: background 140ms ease, color 140ms ease, border-color 140ms ease;
}

.repair-chat-date-choice:hover {
  border-color: var(--repair-chat-teal);
}

.repair-chat-date-choice[aria-pressed="true"] {
  border-color: var(--repair-chat-teal);
  background: var(--repair-chat-teal);
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--repair-chat-teal);
}

.repair-chat-date-day,
.repair-chat-date-month {
  font-size: 0.7rem;
  line-height: 1.2;
}

.repair-chat-date-number {
  font-size: 1.35rem;
  line-height: 1.2;
}

.repair-chat-choice-list--devices {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.repair-chat-choice-list--times {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.repair-chat-time-choice {
  display: flex;
  min-width: 0;
  min-height: 4.7rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.15rem;
  padding: 0.5rem 0.25rem;
  border-radius: 0.8rem;
  font-size: 0.76rem;
}

.repair-chat-time-choice .bi {
  font-size: 1rem;
}

.repair-chat-time-choice small {
  color: var(--repair-chat-muted);
  font-size: 0.65rem;
  font-weight: 500;
}

.repair-chat-time-choice[aria-pressed="true"] small {
  color: inherit;
}

.repair-chat-device-choice {
  display: flex;
  min-height: 5.25rem;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.7rem 0.35rem;
  border-radius: 0.85rem;
  background: #fff;
  font-size: 0.78rem;
}

.repair-chat-device-choice .bi {
  font-size: 1.35rem;
}

.repair-chat-device-choice[aria-pressed="true"] {
  border-color: var(--repair-chat-teal);
  background: #e7f6f3;
  color: #075c61;
  box-shadow: inset 0 0 0 1px var(--repair-chat-teal);
}

.repair-chat-location-actions {
  display: grid;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.repair-chat-location-button {
  justify-self: start;
  padding: 0.55rem 0.75rem;
  border: 1px solid #8bbfbb;
  border-radius: 0.65rem;
  background: #f7ffff;
  color: #145b61;
  cursor: pointer;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
}

.repair-chat-location-button:hover:not(:disabled) {
  border-color: var(--repair-chat-teal);
  background: #e7f6f3;
}

.repair-chat-location-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.repair-chat-location-progress {
  width: 100%;
  height: 0.35rem;
  overflow: hidden;
  border-radius: 999px;
  background: #dcebea;
}

.repair-chat-location-progress[hidden] {
  display: none;
}

.repair-chat-location-progress-bar {
  display: block;
  width: 38%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #087f80, #54b6a2);
  animation: repair-chat-location-progress 1.1s ease-in-out infinite;
}

.repair-chat-detected-area {
  margin: 0;
  color: #176a4a;
  font-size: 0.82rem;
  font-weight: 650;
}

.repair-chat-location-decline {
  justify-self: start;
  padding: 0.35rem 0;
  border: 0;
  background: transparent;
  color: #42656c;
  font: inherit;
  font-size: 0.79rem;
  text-align: left;
  text-decoration: underline;
  text-underline-offset: 0.15rem;
}

.repair-chat-contact-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.7rem;
}

.repair-chat-contact-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 0.7rem;
  border: 1px solid #b7d9d7;
  border-radius: 999px;
  background: #f7ffff;
  color: #145b61;
  font-size: 0.79rem;
  font-weight: 700;
  text-decoration: none;
}

.repair-chat-contact-link:hover {
  border-color: var(--repair-chat-teal);
  color: #075c61;
  text-decoration: underline;
}

.repair-chat-location-decline:disabled {
  cursor: wait;
  opacity: 0.65;
}

.repair-chat-location-status {
  min-height: 1rem;
  color: var(--repair-chat-muted);
  font-size: 0.78rem;
}

.repair-chat-primary {
  position: absolute;
  right: 0.8rem;
  bottom: 0.8rem;
  z-index: 2;
  box-shadow: 0 0.35rem 1rem rgb(9 83 89 / 24%);
}

.repair-chat-action {
  padding: 0.58rem 0.9rem;
  border-radius: 999px;
  background: var(--repair-chat-teal);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 700;
}

.repair-chat-action:hover {
  background: #06696e;
}

.repair-chat-action:disabled {
  cursor: wait;
  opacity: 0.65;
}

.repair-chat-review-list {
  display: grid;
  gap: 0.35rem;
  margin: 0.55rem 0 0;
  padding-left: 1.15rem;
  color: var(--repair-chat-ink);
  font-size: 0.8rem;
}

.repair-chat-review-list strong {
  color: #335861;
}

.repair-chat-success {
  color: #195c41;
}

@keyframes repair-chat-message-in {
  from { transform: translateY(0.35rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

@keyframes repair-chat-typing-pulse {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.45; }
  30% { transform: translateY(-0.22rem); opacity: 1; }
}

@keyframes repair-chat-location-progress {
  from { transform: translateX(-110%); }
  to { transform: translateX(280%); }
}

@media (max-width: 480px) {
  .repair-chat {
    left: max(0.75rem, env(safe-area-inset-left));
    bottom: max(0.75rem, env(safe-area-inset-bottom));
  }

  .repair-chat-panel {
    width: min(23.5rem, calc(100vw - 1.5rem));
    height: min(39rem, calc(100dvh - 6.25rem));
    min-height: min(24rem, calc(100dvh - 6.25rem));
    bottom: 4.35rem;
  }

  .repair-chat-launcher {
    width: 3.5rem;
    height: 3.5rem;
  }

  .repair-chat-log {
    padding-right: 0.7rem;
    padding-left: 0.7rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .repair-chat *,
  .repair-chat *::before,
  .repair-chat *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }

  .repair-chat-typing-dot {
    animation: none;
    opacity: 0.75;
  }

  .repair-chat-location-progress-bar {
    animation: none;
    width: 100%;
  }
}
