/* Ride94 floating chatbot — matches navy/amber site theme */
.r94-chat {
  --r94-chat-navy: #0f172a;
  --r94-chat-amber: #f59e0b;
  --r94-chat-panel: #ffffff;
  --r94-chat-muted: #64748b;
  z-index: 220;
}

.r94-chat__launcher {
  position: fixed;
  right: 1.5rem;
  bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px));
  z-index: 220;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.7rem 1rem 0.7rem 0.85rem;
  border: none;
  border-radius: 2rem;
  background: var(--r94-chat-navy);
  color: #fff;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.35);
  transition: transform 0.2s, box-shadow 0.2s;
}

.r94-chat__launcher:hover,
.r94-chat__launcher:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 6px 22px rgba(15, 23, 42, 0.45);
  outline: 2px solid var(--r94-chat-amber);
  outline-offset: 2px;
}

.r94-chat__panel {
  position: fixed;
  right: 1rem;
  bottom: calc(8.5rem + env(safe-area-inset-bottom, 0px));
  z-index: 221;
  width: min(100vw - 1.5rem, 360px);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--r94-chat-panel);
  border-radius: 14px;
  box-shadow: 0 12px 40px rgba(15, 23, 42, 0.28);
  overflow: hidden;
  border: 1px solid #e2e8f0;
}

.r94-chat__panel[hidden] {
  display: none !important;
}

.r94-chat__header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
}

.r94-chat__title {
  margin: 0;
  font-size: 1rem;
  font-weight: 700;
}

.r94-chat__sub {
  margin: 0.2rem 0 0;
  font-size: 0.72rem;
  opacity: 0.85;
}

.r94-chat__close {
  border: none;
  background: transparent;
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
}

.r94-chat__messages {
  flex: 1;
  overflow-y: auto;
  padding: 0.85rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  background: #f8fafc;
}

.r94-chat__bubble {
  max-width: 92%;
  padding: 0.55rem 0.75rem;
  border-radius: 12px;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #0f172a;
}

.r94-chat__bubble--bot {
  align-self: flex-start;
  background: #fff;
  border: 1px solid #e2e8f0;
}

.r94-chat__bubble--user {
  align-self: flex-end;
  background: #e0f2fe;
  border: 1px solid #bae6fd;
}

.r94-chat__wa {
  display: inline-block;
  margin-top: 0.4rem;
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  background: #25d366;
  color: #fff !important;
  font-weight: 700;
  font-size: 0.8rem;
  text-decoration: none;
}

.r94-chat__privacy {
  margin: 0;
  padding: 0.35rem 1rem;
  font-size: 0.68rem;
  color: var(--r94-chat-muted);
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.r94-chat__privacy a {
  color: #2563eb;
}

.r94-chat__form {
  display: flex;
  gap: 0.4rem;
  padding: 0.65rem 0.75rem;
  background: #fff;
  border-top: 1px solid #e2e8f0;
}

.r94-chat__form input {
  flex: 1;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  font-size: 0.9rem;
}

.r94-chat__form input:focus-visible {
  outline: 2px solid var(--r94-chat-amber);
  outline-offset: 1px;
}

.r94-chat__send {
  border: none;
  border-radius: 999px;
  padding: 0.55rem 0.9rem;
  background: var(--r94-chat-amber);
  color: #0f172a;
  font-weight: 700;
  cursor: pointer;
}

.r94-chat__send:disabled {
  opacity: 0.6;
  cursor: wait;
}

.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 768px) {
  .r94-chat__launcher-label {
    display: none;
  }
  .r94-chat__launcher {
    right: 1rem;
    padding: 0.85rem;
    border-radius: 50%;
  }
  .r94-chat__panel {
    right: 0.5rem;
    left: 0.5rem;
    width: auto;
    bottom: calc(7.5rem + env(safe-area-inset-bottom, 0px));
  }
}
