/* RedRoute Removals — post-submit confirmation + optional website feedback
   (form-feedback.js). Rendered inside each quote form's own success
   element, so selectors are two classes deep to stay ahead of that
   element's generic `p` / `h3` rules (.quote-form__success p,
   .qj__success p / h3). */
.rr-fb{
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  text-align: left;
  font-family: var(--font-text);
}

/* ---------- Confirmation ---------- */
.rr-fb .rr-fb__confirm{ text-align: center; }
.rr-fb .rr-fb__check{
  display: inline-flex;
  color: var(--red);
  margin-bottom: 12px;
}
.rr-fb .rr-fb__title{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.4rem, 2.2vw, 1.85rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: var(--black);
}
.rr-fb .rr-fb__lede{
  max-width: none;
  margin: 10px 0 0;
  font-size: 1rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ---------- Rating ---------- */
.rr-fb .rr-fb__rate{
  margin-top: 28px;
  padding-top: 26px;
  border-top: 1px solid var(--grey-soft);
  text-align: center;
}
.rr-fb .rr-fb__hint{
  max-width: none;
  margin: 6px 0 0;
  font-size: 0.86rem;
  line-height: 1.5;
  color: var(--text-secondary);
}
.rr-fb .rr-fb__stars{
  display: flex;
  justify-content: center;
  margin-top: 2px;
}
/* The quick-quote success element colours every svg red
   (.quote-form__success svg) — let the stars take PeekRating's own
   idle/active colour from .peek-rating__glyph instead. */
.rr-fb .peek-rating__glyph > svg{ color: inherit; }

/* ---------- Optional questions (revealed after a rating) ----------
   0fr → 1fr grid-row animation: the block grows smoothly from zero
   height instead of popping in and shoving the page down. */
.rr-fb .rr-fb__reveal{
  display: grid;
  grid-template-rows: 0fr;
  opacity: 0;
  visibility: hidden;
  transition: grid-template-rows 0.45s var(--ease), opacity 0.35s var(--ease), visibility 0s linear 0.45s;
}
.rr-fb .rr-fb__reveal.is-open{
  grid-template-rows: 1fr;
  opacity: 1;
  visibility: visible;
  transition: grid-template-rows 0.45s var(--ease), opacity 0.35s var(--ease) 0.08s, visibility 0s;
}
.rr-fb .rr-fb__reveal-inner{ min-height: 0; overflow: hidden; }

.rr-fb .rr-fb__panel{
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 26px 2px 2px;
  transition: opacity 0.22s var(--ease), transform 0.22s var(--ease);
}
.rr-fb .rr-fb__panel.is-leaving{ opacity: 0; transform: translateY(-6px); }
.rr-fb .rr-fb__panel[hidden]{ display: none; }

.rr-fb .rr-fb__group{
  display: block;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.rr-fb .rr-fb__q{
  display: block;
  max-width: none;
  margin: 0 0 10px;
  padding: 0;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--black);
}
.rr-fb .rr-fb__q--center{ margin-bottom: 0; font-size: 1rem; }

.rr-fb .rr-fb__chips{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.rr-fb .rr-fb__chip{ position: relative; display: inline-flex; cursor: pointer; }
.rr-fb .rr-fb__chip input{
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}
.rr-fb .rr-fb__chip span{
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border: 1px solid var(--grey-border);
  border-radius: 999px;
  background: var(--white);
  font-size: 0.82rem;
  line-height: 1.3;
  color: var(--black);
  transition: border-color 0.2s var(--ease), color 0.2s var(--ease), background-color 0.2s var(--ease);
}
.rr-fb .rr-fb__chip:hover span{ border-color: var(--black); }
.rr-fb .rr-fb__chip input:checked + span{
  border-color: var(--red);
  background: var(--red-tint);
  color: var(--red);
}
.rr-fb .rr-fb__chip input:focus-visible + span{
  outline: 2px solid var(--red);
  outline-offset: 2px;
}

.rr-fb .rr-fb__input{
  display: block;
  width: 100%;
  padding: 12px 18px;
  border: 1px solid var(--grey-border);
  border-radius: 999px;
  background: var(--white);
  font-family: var(--font-text);
  font-size: 0.9rem;
  line-height: 1.45;
  color: var(--black);
  transition: border-color 0.2s var(--ease);
}
.rr-fb .rr-fb__textarea{
  min-height: 92px;
  border-radius: 18px;
  resize: vertical;
}
.rr-fb .rr-fb__input::placeholder{ color: #9A9A96; }
.rr-fb .rr-fb__input:focus,
.rr-fb .rr-fb__input:focus-visible{
  outline: none;
  border-color: var(--black);
  box-shadow: 0 0 0 3px rgba(17, 17, 17, 0.08);
}

.rr-fb .rr-fb__note-title{
  max-width: none;
  margin: 0;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--black);
}
.rr-fb .rr-fb__note-text{
  max-width: none;
  margin: 4px 0 0;
  font-size: 0.84rem;
  line-height: 1.6;
  color: var(--text-secondary);
}

.rr-fb .rr-fb__footer{
  display: flex;
  justify-content: space-between;
  align-items: center;           /* button centred on the whole text block */
  gap: 24px;
}
.rr-fb .rr-fb__note{ flex: 1 1 auto; min-width: 0; }
.rr-fb .rr-fb__submit{ flex: 0 0 auto; }
.rr-fb .rr-fb__send[disabled]{ opacity: 0.6; cursor: default; }
.rr-fb .rr-fb__error{
  max-width: none;
  margin: -8px 0 0;
  font-size: 0.82rem;
  color: var(--red);
}
.rr-fb .rr-fb__error:empty{ display: none; }

/* ---------- After feedback is sent ---------- */
.rr-fb .rr-fb__thanks{
  padding: 26px 0 4px;
  text-align: center;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.35s var(--ease), transform 0.35s var(--ease);
}
.rr-fb .rr-fb__thanks.is-shown{ opacity: 1; transform: none; }
.rr-fb .rr-fb__check--small{ margin-bottom: 8px; }
.rr-fb .rr-fb__check--small svg{ width: 28px; height: 28px; }
.rr-fb .rr-fb__thanks-title{
  max-width: none;
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--black);
}
.rr-fb .rr-fb__thanks-text{
  max-width: none;
  margin: 4px 0 0;
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--text-secondary);
}

/* ---------- Rating-only (quick quote): confirmation + stars + one line ---------- */
.rr-fb--rating-only{ text-align: center; }
.rr-fb .rr-fb__saved{
  max-width: none;
  min-height: 1.4em;           /* reserved, so the line appearing never shifts the card */
  margin: 2px 0 0;
  font-size: 0.84rem;
  line-height: 1.4;
  color: var(--text-secondary);
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.3s var(--ease), transform 0.3s var(--ease);
}
.rr-fb .rr-fb__saved.is-shown{ opacity: 1; transform: none; }
.rr-fb .rr-fb__saved.is-error{ color: var(--red); }

/* ---------- Compact variant: inside the homepage quick-quote card ---------- */
.rr-fb--compact .rr-fb__title{ font-size: 1.3rem; }
.rr-fb--compact .rr-fb__lede{ font-size: 0.92rem; }
.rr-fb--compact .rr-fb__rate{ margin-top: 22px; padding-top: 20px; }
.rr-fb--compact .rr-fb__panel{ gap: 18px; padding-top: 22px; }

@media (max-width: 560px){
  .rr-fb .rr-fb__footer{ flex-direction: column; align-items: center; gap: 18px; }
  .rr-fb .rr-fb__note{ align-self: stretch; }
}

@media (prefers-reduced-motion: reduce){
  .rr-fb .rr-fb__reveal,
  .rr-fb .rr-fb__reveal.is-open,
  .rr-fb .rr-fb__panel,
  .rr-fb .rr-fb__thanks,
  .rr-fb .rr-fb__saved{ transition: none; }
}
