/* =========================================================================
   Rabbit & Sparrow — chat widget styles
   Palette and type follow the studio brand. Note: no pure white anywhere.
   ========================================================================= */

/* Bubble + tooltip wrapper */
.rsc-bubble-wrap {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9998;
  display: flex;
  align-items: center;
  gap: 0;
}
.rsc-bubble-wrap.rsc-hidden { display: none; }

.rsc-tooltip {
  position: relative;
  margin-right: 10px;
  padding: 9px 16px;
  background: #2C2C2C;
  color: #F5F0E8;
  font-family: 'DM Sans', system-ui, sans-serif;
  font-size: 13px;
  font-weight: 500;
  border-radius: 10px;
  white-space: nowrap;
  box-shadow: 0 4px 16px rgba(44, 44, 44, 0.22);
  animation: rsc-nudge 0.4s ease 1s both;
}
.rsc-tooltip::after {
  content: '';
  position: absolute;
  right: -6px;
  top: 50%;
  transform: translateY(-50%);
  border: 6px solid transparent;
  border-left-color: #2C2C2C;
  border-right: none;
}
@keyframes rsc-nudge {
  from { opacity: 0; transform: translateX(8px); }
  to   { opacity: 1; transform: translateX(0); }
}

.rsc-bubble {
  flex-shrink: 0;
  width: 60px;
  height: 60px;
  border: none;
  border-radius: 50%;
  background: #2C2C2C;
  color: #F5F0E8;
  font-size: 24px;
  cursor: pointer;
  box-shadow: 0 6px 24px rgba(44, 44, 44, 0.28);
  transition: transform 0.2s ease;
  overflow: hidden;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}
.rsc-bubble img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}
.rsc-bubble:hover { transform: scale(1.06); }

.rsc-panel {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 9999;
  display: none;
  flex-direction: column;
  width: 372px;
  max-height: 78vh;
  overflow: hidden;
  border: 1px solid #C4A265;
  border-radius: 14px;
  background: #F5F0E8;
  box-shadow: 0 16px 48px rgba(44, 44, 44, 0.3);
  font-family: 'DM Sans', system-ui, sans-serif;
  color: #2C2C2C;
}
.rsc-panel.rsc-open { display: flex; }

.rsc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 18px;
  background: #2C2C2C;
  color: #F5F0E8;
}
.rsc-head-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.3px;
}
.rsc-head-sub { font-size: 12px; opacity: 0.7; margin-top: 2px; }
.rsc-close {
  border: none;
  background: none;
  color: #F5F0E8;
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  opacity: 0.8;
}
.rsc-close:hover { opacity: 1; }

.rsc-progress { height: 3px; background: #E8E0D4; }
.rsc-progress-fill {
  height: 100%;
  width: 0;
  background: #C4A265;
  transition: width 0.3s ease;
}

.rsc-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px 18px 8px;
}

.rsc-intro {
  font-size: 14px;
  line-height: 1.6;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid #E8E0D4;
}

.rsc-ask {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 22px;
  line-height: 1.3;
  margin: 0 0 6px;
}
.rsc-help {
  font-size: 12.5px;
  line-height: 1.5;
  opacity: 0.7;
  margin: 0 0 14px;
}

.rsc-opt {
  display: block;
  width: 100%;
  margin-bottom: 8px;
  padding: 13px 15px;
  border: 1px solid #E8E0D4;
  border-radius: 9px;
  background: #FDFBF7;
  font-family: inherit;
  font-size: 14px;
  color: #2C2C2C;
  text-align: left;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.rsc-opt:hover { border-color: #B8704B; background: #F5F0E8; }
.rsc-opt.rsc-picked { border-color: #B8704B; background: #F5F0E8; }
.rsc-opt.rsc-picked::after { content: ' ✓'; color: #B8704B; }

.rsc-field { margin-bottom: 12px; }
.rsc-field label {
  display: block;
  margin-bottom: 5px;
  font-size: 12.5px;
  font-weight: 500;
  opacity: 0.8;
}
.rsc-field input {
  width: 100%;
  padding: 11px 13px;
  border: 1px solid #E8E0D4;
  border-radius: 9px;
  background: #FDFBF7;
  font-family: inherit;
  font-size: 14px;
  color: #2C2C2C;
  box-sizing: border-box;
}
.rsc-field input:focus { outline: none; border-color: #B8704B; }
.rsc-field.rsc-invalid input { border-color: #A34B32; }
.rsc-error { margin-top: 4px; font-size: 12px; color: #A34B32; }

.rsc-primary {
  width: 100%;
  margin-top: 6px;
  padding: 13px;
  border: none;
  border-radius: 9px;
  background: #B8704B;
  color: #F5F0E8;
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
}
.rsc-primary:hover { background: #A3603E; }

.rsc-nudge {
  margin: 10px 0 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.68;
  font-style: italic;
}

.rsc-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 18px 14px;
  font-size: 12px;
}
.rsc-back {
  border: none;
  background: none;
  padding: 0;
  color: #2C2C2C;
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  opacity: 0.6;
}
.rsc-back:hover { opacity: 1; }
.rsc-step { opacity: 0.45; }

.rsc-done-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 24px;
  margin: 0 0 10px;
}
.rsc-done-msg { font-size: 14px; line-height: 1.65; margin-bottom: 16px; }

.rsc-summary {
  margin-bottom: 16px;
  padding: 13px 15px;
  border-left: 2px solid #C4A265;
  background: #EFE8DC;
  border-radius: 0 8px 8px 0;
  font-size: 12.5px;
  line-height: 1.75;
}
.rsc-summary b { font-weight: 500; }

/* Debug panel. Only rendered when RS_CHAT_DEBUG is true. */
.rsc-debug {
  margin-top: 14px;
  padding: 11px 13px;
  border: 1px dashed #7A8B6F;
  border-radius: 8px;
  background: #EDF0EA;
  font-family: ui-monospace, Menlo, monospace;
  font-size: 11px;
  line-height: 1.55;
  white-space: pre-wrap;
  word-break: break-word;
}
.rsc-debug-tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #7A8B6F;
  color: #F5F0E8;
  font-size: 10px;
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

@media (max-width: 480px) {
  .rsc-panel {
    right: 0; bottom: 0; left: 0;
    width: 100%;
    max-height: 88vh;
    border-radius: 14px 14px 0 0;
  }
  .rsc-bubble-wrap { right: 16px; bottom: 16px; }
}
