/*
 * QuoteColo: form thank-you state (v1, 16 Nov 2026)
 * After a successful send, the form's fields are hidden and this panel takes their place inside the same white card.
 * Self-contained: uses the design-system tokens when the page has them, with the DESIGN.md values as fallbacks.
 * Font is inherited from the page (Schibsted Grotesk). Breakpoints: desktop >= 1280, tablet 768-1279, mobile < 768.
 */

/* While the thank-you panel is shown, everything else inside the form is hidden (fields, button, legal line,
   the old small status notes: .wpcf7-response-output, .form-note, .mw-form-status). Nothing is removed. */
.qc-is-sent > :not(.qc-success) { display: none !important; }

/* Contact Form 7 prints its message twice: once for screen readers and once on screen. CF7's own stylesheet hides
   the screen-reader copy, but these pages don't load it, so the text shows at the top of the form as well. */
.wpcf7:has(form.qc-is-sent) .screen-reader-response {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.qc-success {
  --qcs-text: var(--color-text-primary, #131D2C);
  --qcs-text-2: var(--color-text-secondary, #424B57);
  --qcs-text-3: var(--color-text-tertiary, #7B7E8C);
  --qcs-accent: var(--color-text-accent, #0C7DFF);
  --qcs-accent-hover: var(--color-text-accent-hover, #0A6CDD);
  --qcs-bg-accent: var(--color-bg-accent, #0C7DFF);
  --qcs-pale: var(--color-bg-accent-pale, rgba(12, 125, 255, 0.10));
  --qcs-pale-hover: var(--color-bg-accent-pale-hover, rgba(12, 125, 255, 0.20));
  --qcs-line: var(--color-border-neutral, #E9E9EB);
  --qcs-shadow: var(--shadow-button, 0 4px 4px rgba(12, 89, 255, 0.03), 0 8px 8px rgba(12, 89, 255, 0.04));
  --qcs-ease: var(--ease, cubic-bezier(0.2, 0, 0, 1));
  --qcs-hover: color 300ms var(--qcs-ease), background-color 300ms var(--qcs-ease), border-color 300ms var(--qcs-ease), box-shadow 300ms var(--qcs-ease);

  box-sizing: border-box;
  grid-column: 1 / -1;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 32px;
  color: var(--qcs-text);
  font-family: inherit;
  letter-spacing: -0.02em;
  text-align: left;
  scroll-margin-top: 120px;
  scroll-margin-bottom: 24px;
  animation: qcs-in 700ms var(--qcs-ease) both;
}
.qc-success *, .qc-success *::before, .qc-success *::after { box-sizing: border-box; letter-spacing: inherit; }

@keyframes qcs-in { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: none; } }

/* Check tile, heading and the message */
.qc-success__head { display: flex; flex-direction: column; gap: 24px; }
.qc-success__tile {
  display: grid; place-items: center; flex-shrink: 0; width: 40px; height: 40px;
  border-radius: 12px; corner-shape: superellipse(1.5);
  background: var(--qcs-pale); color: var(--qcs-accent);
}
.qc-success__tile svg { display: block; width: 24px; height: 24px; }
.qc-success__copy { display: flex; flex-direction: column; gap: 16px; }
.qc-success__title {
  margin: 0; color: var(--qcs-text);
  font-family: inherit; font-size: 32px; line-height: 40px; font-weight: 600; letter-spacing: -0.02em;
  outline: none;
}
.qc-success__text {
  margin: 0; color: var(--qcs-text-2);
  font-family: inherit; font-size: 20px; line-height: 24px; font-weight: 400;
}
.qc-success__email { color: var(--qcs-text); font-weight: 500; overflow-wrap: anywhere; }

/* "Need to add something or talk sooner?" with the phone and email links */
.qc-success__help {
  display: flex; flex-direction: column; gap: 16px;
  padding-top: 24px; border-top: 1px solid var(--qcs-line);
}
.qc-success__label { margin: 0; color: var(--qcs-text); font-family: inherit; font-size: 16px; line-height: 20px; font-weight: 500; }
.qc-success__links { display: flex; flex-wrap: wrap; gap: 16px 32px; }
.qc-success__link {
  display: inline-flex; align-items: center; gap: 8px; min-width: 0;
  color: var(--qcs-text); text-decoration: none;
  font-family: inherit; font-size: 20px; line-height: 24px; font-weight: 500;
  transition: var(--qcs-hover);
}
.qc-success__link .qc-success__tile { transition: var(--qcs-hover); }
.qc-success__link:hover { color: var(--qcs-accent-hover); }
.qc-success__link:hover .qc-success__tile { background: var(--qcs-pale-hover); }
.qc-success__link-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; overflow-wrap: anywhere; }
.qc-success__hours { color: var(--qcs-text-3); font-size: 14px; line-height: 16px; font-weight: 400; }

/* Buttons: Button S, Filled and Outline (DESIGN.md 6.1) */
.qc-success__actions { display: flex; flex-wrap: wrap; gap: 16px; }
.qc-success__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 4px; white-space: nowrap;
  height: 52px; padding: 0 24px; margin: 0; border: 0; border-radius: 14px; corner-shape: superellipse(1.5);
  font-family: inherit; font-size: 16px; line-height: 20px; font-weight: 500; letter-spacing: -0.02em;
  cursor: pointer; text-decoration: none; transition: var(--qcs-hover);
}
.qc-success__btn--filled { background: var(--qcs-bg-accent); color: #FFFFFF; box-shadow: inset 0 0 0 2px var(--qcs-bg-accent), var(--qcs-shadow); }
.qc-success__btn--filled:hover { background: transparent; color: var(--qcs-accent); box-shadow: inset 0 0 0 2px var(--qcs-accent), var(--qcs-shadow); }
.qc-success__btn--outline { background: transparent; color: var(--qcs-accent); box-shadow: inset 0 0 0 2px var(--qcs-accent), var(--qcs-shadow); }
.qc-success__btn--outline:hover { background: var(--qcs-bg-accent); color: #FFFFFF; }
.qc-success__btn:focus-visible, .qc-success__link:focus-visible { outline: 2px solid var(--qcs-accent); outline-offset: 2px; }

/* Tablet 768-1279 */
@media (max-width: 1279px) {
  .qc-success__copy { gap: 12px; }
  .qc-success__title { font-size: 28px; line-height: 32px; }
  .qc-success__text, .qc-success__link { font-size: 18px; line-height: 24px; }
}

/* Mobile < 768 */
@media (max-width: 767px) {
  .qc-success { gap: 24px; }
  .qc-success__head { gap: 16px; }
  .qc-success__tile { width: 32px; height: 32px; }
  .qc-success__tile svg { width: 20px; height: 20px; }
  .qc-success__title { font-size: 24px; line-height: 28px; }
  .qc-success__text, .qc-success__link { font-size: 16px; line-height: 24px; }
  .qc-success__help { gap: 12px; padding-top: 16px; }
  .qc-success__links { flex-direction: column; gap: 12px; }
  .qc-success__hours { font-size: 12px; }
  .qc-success__actions { flex-direction: column; }
  .qc-success__btn { width: 100%; height: 48px; }
}

@media (prefers-reduced-motion: reduce) {
  .qc-success { animation: none; }
  .qc-success__link, .qc-success__link .qc-success__tile, .qc-success__btn { transition: none; }
}
