.rh-support {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #0f172a;
}

.rh-support * {
  box-sizing: border-box;
}

.rh-support-launcher {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 48px;
  padding: 10px 15px 10px 12px;
  border: 1px solid rgba(15, 23, 42, .16);
  border-radius: 999px;
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 12px 36px rgba(15, 23, 42, .18);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.rh-support-launcher:hover {
  border-color: rgba(37, 99, 235, .32);
  box-shadow: 0 16px 42px rgba(15, 23, 42, .22);
}

.rh-support-launcher img,
.rh-support-logo img {
  display: block;
  width: 26px;
  height: 26px;
  object-fit: contain;
}

.rh-support-panel {
  position: absolute;
  right: 0;
  bottom: 64px;
  width: min(390px, calc(100vw - 28px));
  height: min(650px, calc(100vh - 108px));
  display: none;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid rgba(15, 23, 42, .14);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 24px 64px rgba(15, 23, 42, .28);
}

.rh-support.open .rh-support-panel {
  display: flex;
}

.rh-support.open .rh-support-launcher {
  background: #0f172a;
  color: #ffffff;
}

.rh-support-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 14px;
  border-bottom: 1px solid #e2e8f0;
  background: #ffffff;
}

.rh-support-logo {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.rh-support-title {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.1;
}

.rh-support-status {
  margin-top: 3px;
  color: #64748b;
  font-size: 11px;
  font-weight: 700;
}

.rh-support-close {
  width: 32px;
  height: 32px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  background: #f8fafc;
  color: #475569;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

.rh-support-close:hover {
  background: #eef2ff;
  color: #1d4ed8;
}

.rh-support-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  background: #f8fafc;
}

.rh-support-msg {
  max-width: 86%;
  margin: 0 0 10px;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.rh-support-msg.bot {
  margin-right: auto;
  border: 1px solid #dbeafe;
  background: #ffffff;
  color: #0f172a;
}

.rh-support-msg.user {
  margin-left: auto;
  background: #1f3a5f;
  color: #ffffff;
}

.rh-support-msg a {
  color: #1d4ed8;
  font-weight: 800;
}

.rh-support-msg.user a {
  color: #bfdbfe;
}

.rh-support-menu,
.rh-support-ctas {
  display: grid;
  gap: 8px;
  margin: 10px 0 12px;
}

.rh-support-menu {
  grid-template-columns: 1fr;
}

.rh-support-ctas {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.rh-support-chip,
.rh-support-cta,
.rh-support-submit {
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  text-align: center;
}

.rh-support-chip {
  padding: 9px 10px;
  text-align: left;
}

.rh-support-chip:hover,
.rh-support-cta:hover {
  border-color: #2563eb;
  color: #1d4ed8;
  background: #eff6ff;
}

.rh-support-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 10px;
  text-decoration: none;
}

.rh-support-form {
  margin: 10px 0 14px;
  padding: 12px;
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #ffffff;
}

.rh-support-form h3 {
  margin: 0 0 8px;
  font-size: 14px;
  line-height: 1.2;
}

.rh-support-field {
  margin-bottom: 9px;
}

.rh-support-field label {
  display: block;
  margin-bottom: 4px;
  color: #334155;
  font-size: 11px;
  font-weight: 800;
}

.rh-support-field input,
.rh-support-field select,
.rh-support-field textarea {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  background: #ffffff;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  outline: none;
}

.rh-support-field textarea {
  min-height: 76px;
  resize: vertical;
}

.rh-support-field input:focus,
.rh-support-field select:focus,
.rh-support-field textarea:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px #eff6ff;
}

.rh-support-submit {
  width: 100%;
  margin-top: 8px;
  border-color: #1f3a5f;
  background: #1f3a5f;
  color: #ffffff;
}

.rh-support-submit:disabled {
  cursor: wait;
  opacity: .72;
}

.rh-support-error {
  display: none;
  margin: 8px 0;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fef2f2;
  color: #b91c1c;
  font-size: 12px;
  font-weight: 700;
}

.rh-support-error.show {
  display: block;
}

.rh-support-turnstile {
  min-height: 65px;
  margin: 6px 0 0;
}

.rh-support-foot {
  display: flex;
  gap: 8px;
  padding: 11px;
  border-top: 1px solid #e2e8f0;
  background: #ffffff;
}

.rh-support-input {
  flex: 1;
  min-width: 0;
  min-height: 40px;
  max-height: 100px;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 6px;
  color: #0f172a;
  font: inherit;
  font-size: 13px;
  outline: none;
  resize: none;
}

.rh-support-input:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 3px #eff6ff;
}

.rh-support-send {
  width: 42px;
  height: 40px;
  display: inline-grid;
  place-items: center;
  border: 1px solid #1f3a5f;
  border-radius: 6px;
  background: #1f3a5f;
  color: #ffffff;
  font: inherit;
  font-size: 16px;
  font-weight: 900;
  cursor: pointer;
}

.rh-support-send:disabled {
  cursor: wait;
  opacity: .65;
}

.rh-support-hp {
  position: absolute;
  left: -9999px;
  top: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

@media (max-width: 760px) {
  .rh-support {
    right: 12px;
    bottom: 76px;
  }

  .rh-support-panel {
    right: -2px;
    bottom: 58px;
    height: min(620px, calc(100vh - 150px));
  }

  .rh-support-launcher {
    min-height: 44px;
    padding: 9px 12px;
  }
}
