/*
 * Help Center feedback widget styles.
 * Cars.com 2026 brand values. Brand wins over the WordPress theme wherever they differ.
 * Palette: Cars Purple #65299D, Nitro #331953, Power Purple #9754E6, black #141817,
 * purple scale 20 #EADDFA / 30 #D5BAF5 / 60 #9653E5 / 90 #482077 / 100 #1E112E,
 * Sky scale 60 #1B82EE / 70 #0D6BC9 / 100 #031A35.
 */
.hcfb {
  --hcfb-bar: #65299D;                         /* card edge: Cars Purple */
  --hcfb-accent: #65299D;                      /* Cars Purple */
  --hcfb-accent-text: #FFFFFF;
  --hcfb-hover-tint: rgba(101, 41, 157, 0.08); /* light opacity of Cars Purple */
  --hcfb-active-tint: rgba(101, 41, 157, 0.16);
  --hcfb-heading: #331953;                     /* Nitro Purple */
  --hcfb-text: #141817;                        /* brand black, web typography */
  --hcfb-muted: #5B5566;
  --hcfb-surface: #FFFFFF;
  --hcfb-border: #EADDFA;                      /* purple-20 */
  --hcfb-chip-border: #D5BAF5;                 /* purple-30 */
  --hcfb-focus: #9754E6;                       /* Power Purple */
  --hcfb-cars-link: #65299D;
  --hcfb-di-link: #0D6BC9;                     /* Sky-70 */
  /* Yes / No buttons: solid brand color. Purple-60 for the Cars.com family, Sky-50 for Dealer Inspire. */
  --hcfb-solid: #9653E5;                       /* Purple-60 */
  --hcfb-solid-hover: #482077;                 /* Purple-90 */
  --hcfb-dark: #331953;                        /* Nitro Purple: No button outline and text at rest */
  --hcfb-heading-font: 'DM Sans', 'Helvetica Neue', Arial, sans-serif;
}

/* Dealer Inspire articles: blue brand variations only (Sky scale, Navy, Blue Sunrise). */
.hcfb.hcfb--di {
  --hcfb-bar: #1B82EE;                         /* Sky-60 */
  --hcfb-accent: #0D6BC9;                      /* Sky-70: 5:1 on white for text and outlines */
  --hcfb-hover-tint: rgba(27, 130, 238, 0.10); /* light opacity of Sky Blue */
  --hcfb-active-tint: rgba(27, 130, 238, 0.20);
  --hcfb-heading: #08407D;                     /* Navy Blue, Sky-90 */
  --hcfb-border: #C7E0FF;                      /* Sky-20 */
  --hcfb-chip-border: #9CC4FC;                 /* Sky-30 */
  --hcfb-focus: #1B82EE;                       /* Sky-60 */
  --hcfb-solid: #3996F9;                       /* Sky-50 */
  --hcfb-solid-hover: #0A2B59;
  --hcfb-dark: #031A35;                        /* Deep Blue (Sky-100) */
}

.hcfb {

  box-sizing: border-box;
  margin: 40px 0 0;
  padding: 24px;
  background: var(--hcfb-surface);
  color: var(--hcfb-text);
  border: 1px solid var(--hcfb-border);
  border-left: 4px solid var(--hcfb-bar);
  border-radius: 12px;
  font-family: 'Apercu Pro', 'Figtree', 'Helvetica Neue', Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  clear: both;
  max-width: 760px;
}
.hcfb *, .hcfb *::before, .hcfb *::after { box-sizing: border-box; }
.hcfb [hidden] { display: none !important; }

.hcfb h2 {
  font-family: var(--hcfb-heading-font);
  font-weight: 700;
  letter-spacing: -0.03em;
  /* The theme sets h2 { font-size/weight: ... !important } inline, so these two need !important too. */
  font-size: 32px !important;
  font-weight: 700 !important;
  line-height: 1.2;
  color: var(--hcfb-heading);
  margin: 0 0 16px;
}
.hcfb h2:focus { outline: none; }
.hcfb h2:focus-visible { outline: 3px solid var(--hcfb-focus); outline-offset: 4px; border-radius: 4px; }
.hcfb p { margin: 0 0 12px; color: var(--hcfb-text); }

.hcfb-view { animation: hcfb-in .18s ease-out; }
@keyframes hcfb-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

.hcfb-row { display: flex; flex-wrap: wrap; gap: 12px; }
.hcfb-row.hcfb-chips { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); max-width: 600px; }

.hcfb-btn, .hcfb-chip {
  font: inherit; font-weight: 500; cursor: pointer;
  min-height: 44px; display: inline-flex; align-items: center; gap: 10px;
  padding: 0 20px; border-radius: 999px;
  background: transparent; color: var(--hcfb-accent);
  border: 1.5px solid var(--hcfb-accent);
  transition: background-color .12s ease, color .12s ease;
}
.hcfb-btn:hover, .hcfb-chip:hover { background: var(--hcfb-hover-tint); }
.hcfb-btn:active, .hcfb-chip:active { background: var(--hcfb-active-tint); }
/* Yes: solid brand color. No: plain white with a dark outline. Both hover to the same darker color. */
.hcfb-btn--solid, .hcfb-btn--invert { font-weight: 700; min-width: 104px; justify-content: center; }
.hcfb-btn--solid {
  background: var(--hcfb-solid); color: var(--hcfb-accent-text); border-color: var(--hcfb-solid);
}
.hcfb-btn--solid:hover { background: var(--hcfb-solid-hover); border-color: var(--hcfb-solid-hover); color: var(--hcfb-accent-text); }
.hcfb-btn--solid:active { background: var(--hcfb-solid-hover); filter: brightness(0.85); }
.hcfb-btn--invert {
  background: var(--hcfb-surface); color: var(--hcfb-dark); border-color: var(--hcfb-dark);
}
.hcfb-btn--invert:hover { background: var(--hcfb-solid-hover); border-color: var(--hcfb-solid-hover); color: var(--hcfb-accent-text); }
.hcfb-btn--invert:active { background: var(--hcfb-solid-hover); color: var(--hcfb-accent-text); filter: brightness(0.85); }
.hcfb-btn svg {
  width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round; flex: none; display: block;
}
.hcfb-btn > span:first-child { display: inline-flex; }

.hcfb-chip {
  width: 100%; justify-content: center; text-align: center; padding: 6px 16px;
  border-color: var(--hcfb-chip-border); color: var(--hcfb-text);
}
.hcfb-chip:hover { border-color: var(--hcfb-accent); color: var(--hcfb-accent); }

.hcfb-btn:focus-visible, .hcfb-chip:focus-visible, .hcfb-link:focus-visible,
.hcfb-cta:focus-visible, .hcfb-support-link:focus-visible, .hcfb textarea:focus-visible {
  outline: 3px solid var(--hcfb-focus); outline-offset: 2px;
}

.hcfb-link {
  font: inherit; background: none; border: 0; padding: 4px 0; cursor: pointer;
  color: var(--hcfb-muted); text-decoration: underline; text-underline-offset: 3px;
}
.hcfb-link:hover { color: var(--hcfb-accent); }
.hcfb-skip { margin-top: 14px; }

.hcfb-cta {
  font: inherit; font-weight: 500; cursor: pointer; text-decoration: none;
  min-height: 44px; display: inline-flex; align-items: center; padding: 6px 20px; border-radius: 999px;
  background: transparent; color: var(--hcfb-text); border: 1.5px solid var(--hcfb-chip-border);
  margin: 4px 0 8px; transition: background-color .12s ease, color .12s ease;
}
.hcfb-cta:hover { background: var(--hcfb-hover-tint); border-color: var(--hcfb-accent); color: var(--hcfb-accent); }
.hcfb-cta:active { background: var(--hcfb-active-tint); }

.hcfb-support-line { margin: 4px 0 8px; }
.hcfb-support-link {
  font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px;
  text-underline-offset: 3px; overflow-wrap: anywhere;
}
.hcfb-support-link:hover { text-decoration-thickness: 3px; }
.hcfb-support-link.cars { color: var(--hcfb-cars-link); }
.hcfb-support-link.di { color: var(--hcfb-di-link); }

.hcfb-thanks-head { display: flex; gap: 12px; align-items: flex-start; }
.hcfb-thanks-head h2 { margin-bottom: 8px; }
.hcfb-tick {
  flex: none; width: 28px; height: 28px; border-radius: 50%;
  background: var(--hcfb-border); color: var(--hcfb-accent);
  display: grid; place-items: center;
}
.hcfb-tick svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }

.hcfb-comment-box { margin-top: 12px; }
.hcfb-comment-box label { display: block; font-weight: 500; margin-bottom: 6px; }
.hcfb textarea {
  width: 100%; min-height: 84px; resize: vertical; font: inherit; color: var(--hcfb-text);
  background: var(--hcfb-surface); border: 1.5px solid var(--hcfb-border); border-radius: 10px; padding: 10px 12px;
}
.hcfb-help { margin: 6px 0 0; font-size: 14px; color: var(--hcfb-muted); }
.hcfb-comment-actions { display: flex; align-items: center; gap: 12px; margin-top: 10px; }
.hcfb-count { font-size: 13px; color: var(--hcfb-muted); margin-left: auto; }

@media (max-width: 1024px) { .hcfb h2 { font-size: 29px !important; } }
@media (max-width: 520px) {
  .hcfb { padding: 20px 16px; }
  .hcfb h2 { font-size: 26px !important; }
  .hcfb-row.hcfb-chips { grid-template-columns: 1fr; }
  .hcfb-chip { justify-content: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  .hcfb-view { animation: none; }
  .hcfb-btn, .hcfb-chip, .hcfb-cta { transition: none; }
}
