/* ============================================================
   ReCounsel support widget, styles.
   Matches the site's ivory/gold/navy editorial palette.
   Uses the same CSS variables defined in style.css when present,
   with fallbacks so this file works standalone too.
   ============================================================ */

.rc-support-bubble {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--rc-navy, #0A1628);
  color: var(--rc-ivory, #FAF7F2);
  border: 1px solid var(--rc-gold, #C8A960);
  font-family: var(--font-body, "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(10, 22, 40, 0.28);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.rc-support-bubble:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(10, 22, 40, 0.34);
}

.rc-support-bubble svg {
  flex-shrink: 0;
  color: var(--rc-gold, #C8A960);
}

.rc-support-bubble.rc-hidden {
  display: none;
}

.rc-support-pane {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 9999;
  width: min(380px, calc(100vw - 32px));
  max-width: 380px;
  max-height: 520px;
  height: min(520px, calc(100vh - 40px));
  display: flex;
  flex-direction: column;
  background: var(--rc-ivory, #FAF7F2);
  border: 1px solid var(--rc-gold, #C8A960);
  border-radius: 16px;
  box-shadow: 0 20px 48px rgba(10, 22, 40, 0.32);
  overflow: hidden;
  font-family: var(--font-body, "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
}

.rc-support-pane.rc-hidden {
  display: none;
}

.rc-support-header {
  background: var(--rc-navy, #0A1628);
  color: var(--rc-ivory, #FAF7F2);
  padding: 16px 18px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex-shrink: 0;
}

.rc-support-header-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.rc-support-title {
  font-family: var(--font-display, "Fraunces", Georgia, serif);
  font-size: 18px;
  font-weight: 600;
  margin: 0;
}

.rc-support-close {
  background: none;
  border: none;
  color: var(--rc-ivory, #FAF7F2);
  opacity: 0.75;
  cursor: pointer;
  padding: 4px;
  line-height: 0;
}

.rc-support-close:hover {
  opacity: 1;
}

.rc-support-subtitle {
  font-size: 12px;
  color: rgba(250, 247, 242, 0.72);
  margin: 0;
  line-height: 1.4;
}

.rc-support-body {
  flex: 1;
  overflow-y: auto;
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: var(--rc-ivory, #FAF7F2);
}

.rc-msg {
  max-width: 85%;
  padding: 9px 12px;
  border-radius: 12px;
  font-size: 13.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-wrap: break-word;
}

.rc-msg-agent {
  align-self: flex-start;
  background: #fff;
  border: 1px solid var(--rc-mist, #E8ECEE);
  color: var(--rc-ink, #111827);
  border-bottom-left-radius: 4px;
}

.rc-msg-user {
  align-self: flex-end;
  background: var(--rc-navy, #0A1628);
  color: var(--rc-ivory, #FAF7F2);
  border-bottom-right-radius: 4px;
}

.rc-msg-system {
  align-self: center;
  background: transparent;
  color: var(--rc-ink-muted, #5B6675);
  font-size: 12px;
  text-align: center;
  max-width: 100%;
}

.rc-support-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--rc-mist, #E8ECEE);
  background: #fff;
  padding: 10px 12px;
}

.rc-support-inputrow {
  display: flex;
  gap: 8px;
}

.rc-support-input {
  flex: 1;
  resize: none;
  border: 1px solid var(--rc-mist, #E8ECEE);
  border-radius: 10px;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--rc-ink, #111827);
  background: var(--rc-ivory, #FAF7F2);
  max-height: 80px;
}

.rc-support-input:focus {
  outline: none;
  border-color: var(--rc-gold, #C8A960);
}

.rc-support-send {
  flex-shrink: 0;
  background: var(--rc-gold, #C8A960);
  color: var(--rc-navy, #0A1628);
  border: none;
  border-radius: 10px;
  padding: 0 16px;
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
}

.rc-support-send:hover {
  background: var(--rc-gold-deep, #A98836);
}

.rc-support-send:disabled {
  opacity: 0.55;
  cursor: default;
}

.rc-talk-human {
  display: block;
  text-align: center;
  margin-top: 8px;
  font-size: 12px;
  color: var(--rc-ink-muted, #5B6675);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  width: 100%;
  font-family: inherit;
}

.rc-talk-human:hover {
  color: var(--rc-navy, #0A1628);
}

/* -------------------- Escalate form -------------------- */

.rc-escalate-form {
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
}

.rc-escalate-form.rc-hidden {
  display: none;
}

.rc-escalate-label {
  font-size: 12.5px;
  color: var(--rc-ink-soft, #3B4453);
  font-weight: 500;
}

.rc-escalate-input,
.rc-escalate-textarea {
  border: 1px solid var(--rc-mist, #E8ECEE);
  border-radius: 10px;
  padding: 9px 11px;
  font-family: inherit;
  font-size: 13.5px;
  color: var(--rc-ink, #111827);
  background: var(--rc-ivory, #FAF7F2);
}

.rc-escalate-textarea {
  resize: vertical;
  min-height: 72px;
}

.rc-escalate-input:focus,
.rc-escalate-textarea:focus {
  outline: none;
  border-color: var(--rc-gold, #C8A960);
}

.rc-escalate-submit {
  background: var(--rc-gold, #C8A960);
  color: var(--rc-navy, #0A1628);
  border: none;
  border-radius: 10px;
  padding: 10px 16px;
  font-weight: 600;
  font-size: 13.5px;
  cursor: pointer;
}

.rc-escalate-submit:hover {
  background: var(--rc-gold-deep, #A98836);
}

.rc-escalate-back {
  align-self: flex-start;
  background: none;
  border: none;
  color: var(--rc-ink-muted, #5B6675);
  font-size: 12.5px;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
}

.rc-fallback {
  font-size: 13px;
  color: var(--rc-ink-soft, #3B4453);
  line-height: 1.5;
  padding: 10px 12px;
  background: var(--rc-ivory-2, #F4EFE7);
  border-radius: 10px;
  border: 1px solid var(--rc-mist, #E8ECEE);
}

.rc-fallback a {
  color: var(--rc-navy, #0A1628);
  font-weight: 600;
}

@media (max-width: 420px) {
  .rc-support-pane {
    right: 12px;
    left: 12px;
    width: auto;
    bottom: 12px;
  }
  .rc-support-bubble {
    right: 12px;
    bottom: 12px;
  }
}
