/* Report Download — layout and the expand animation only. Colours, fonts and spacing are in the
   Style tab ("Open form state", "Field labels", "Fields", "Form buttons", "View report button"). */

.tc-w-report {
  padding: 96px 0 0;
}

.tc-w-report__kicker {
  margin: 0 0 16px;
}

.tc-w-report__title {
  margin: 0 0 16px;
  max-width: var(--tc-span-8, 888px);
}

.tc-w-report__subtitle {
  margin: 0 0 24px;
  max-width: var(--tc-span-6, 660px);
}

.tc-w-report__text {
  margin: 0;
  max-width: var(--tc-read, 432px);
}

/* A blank line in the body becomes the next paragraph. One line of space between them,
   and the original 40px only before the button row. */
.tc-w-report__text + .tc-w-report__text {
  margin-top: 21px;
}

.tc-w-report__text:last-of-type {
  margin-bottom: 40px;
}

/* Control strip (button + form + back/next). It bleeds to the viewport edges so the open
   state can turn the whole row charcoal, while content stays on the page margins. */
.tc-w-report__panel {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin-inline: calc(var(--tc-side, 0px) * -1);
  padding: 0 var(--tc-side, 0px) 48px;
  isolation: isolate;
  transition:
    background-color 0.4s ease-in-out,
    padding 0.4s ease-in-out;
}

/* Style → Open form state → Full-width background: the panel colour reaches both screen edges past
   any boxed container. body has overflow-x: clip, so there is no side scroll. */
.tc-w-report--bleed .tc-w-report__panel::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: -100vw;
  right: -100vw;
  z-index: -1;
  background: inherit;
  pointer-events: none;
}

/* An Elementor container set to Overflow: Hidden would cut the full-width colour off at its edges. */
body.tangerine-theme :is(.e-con, .e-con-inner, .elementor-section, .elementor-container, .elementor-column, .elementor-widget-wrap, .elementor-widget-tc-report-download, .elementor-widget-container):has(.tc-w-report--bleed) {
  --overflow: visible;
  overflow: visible;
}

/* Bottom keyline of the open panel. */
.tc-w-report__panel::after {
  content: "";
  position: absolute;
  left: var(--tc-side, 0px);
  right: var(--tc-side, 0px);
  bottom: 0;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.4s ease-in-out;
}

.tc-w-report.is-open .tc-w-report__panel {
  padding-top: 24px;
  /* 56px from Back/Next to the keyline, then 96px of charcoal below it. */
  padding-bottom: 152px;
}

.tc-w-report.is-open .tc-w-report__panel::after {
  bottom: 96px;
  opacity: 1;
}

.tc-w-report__icon-close {
  display: none;
}

.tc-w-report.is-open .tc-w-report__icon-close {
  display: inline-flex;
}

.tc-w-report.is-open .tc-w-report__open:has(.tc-w-report__icon-close) > .tc-btn-icon {
  display: none;
}

.tc-w-report__open:is(:hover, :focus-visible) .tc-w-report__icon-close .tc-btn-icon {
  transform: scale(calc(1 / var(--tc-h-scale, 1)));
}

/* Back / Next "icon while form is open" (Content tab) replaces the normal icon in the open state. */
.tc-w-report__icon-open {
  display: none;
}

.tc-w-report.is-open .tc-w-report__icon-open {
  display: inline-flex;
}

.tc-w-report.is-open :is(.tc-w-report__back, .tc-w-report__next):has(.tc-w-report__icon-open) > .tc-btn-icon {
  display: none;
}

:is(.tc-w-report__back, .tc-w-report__next):is(:hover, :focus-visible) .tc-w-report__icon-open .tc-btn-icon {
  transform: scale(calc(1 / var(--tc-h-scale, 1)));
}

/* Uploaded SVG arrows keep their own fill / stroke; repaint them so the icon colour controls apply. */
:is(.tc-w-report__back, .tc-w-report__next) .tc-btn-icon svg [fill]:not([fill="none"]) {
  fill: currentColor;
}

:is(.tc-w-report__back, .tc-w-report__next) .tc-btn-icon svg [stroke]:not([stroke="none"]) {
  stroke: currentColor;
}

.tc-w-report__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: center;
}

.tc-w-report__nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 16px;
}

/* Expands from the button without jumping the page: 0fr → 1fr row. */
.tc-w-report__reveal {
  display: grid;
  grid-template-rows: 0fr;
  margin-top: -16px;
  transition:
    grid-template-rows 0.4s ease-in-out,
    margin-top 0.4s ease-in-out;
}

.tc-w-report__reveal-inner {
  min-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: visibility 0s linear 0.4s;
}

.tc-w-report.is-open .tc-w-report__reveal {
  grid-template-rows: 1fr;
  margin-top: 0;
}

.tc-w-report.is-open .tc-w-report__reveal-inner {
  visibility: visible;
  transition-delay: 0s;
}

.tc-w-report__form {
  display: flex;
  flex-direction: column;
  max-width: var(--tc-span-8, 888px);
}

.tc-w-report__intro {
  margin: 0 0 8px;
}

/* One keylined row per field: label column + input. */
.tc-w-report__field {
  display: flex;
  align-items: flex-end;
  gap: 24px;
  min-height: 72px;
  padding: 20px 0 8px;
  border-bottom: 1px solid currentColor;
  box-sizing: border-box;
}

.tc-w-report__label {
  flex: none;
  width: var(--tc-col, 90px);
}

.tc-w-report__field input {
  flex: 1;
  min-width: 0;
  padding: 0;
  border: 0;
  outline: none;
  background: transparent;
  font: inherit;
  color: inherit;
}

.tc-w-report__field input::placeholder {
  color: inherit;
  opacity: 1;
}

.tc-w-report__privacy {
  margin: 40px 0 0;
  text-align: right;
}

.tc-w-report__privacy-link {
  color: inherit;
  text-underline-offset: 3px;
}

.tc-w-report__buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 16px;
  padding-top: 16px;
}

.tc-w-report__submit {
  cursor: pointer;
}

.tc-w-report .tc-form__notice {
  margin: 16px 0 0;
}

.tc-w-report__done {
  margin: 16px 0 0;
}

.tc-w-report__done[hidden] {
  display: none;
}

.tc-w-report__view {
  display: inline-block;
  text-decoration: none;
}

@media (max-width: 900px) {
  .tc-w-report {
    padding-top: 64px;
  }

  .tc-w-report__field {
    gap: 16px;
    min-height: 64px;
  }

  .tc-w-report__label {
    width: 92px;
  }
}

@media (max-width: 600px) {
  .tc-w-report {
    padding-top: 40px;
  }

  .tc-w-report__panel {
    padding-bottom: 40px;
  }

  .tc-w-report__field {
    gap: 12px;
    min-height: 56px;
    padding: 16px 0 8px;
  }

  .tc-w-report__label {
    width: 78px;
  }

  .tc-w-report__privacy {
    margin-top: 24px;
    text-align: left;
  }

  .tc-w-report__buttons {
    justify-content: flex-start;
    gap: 8px;
  }
}

/* Phone form, from the 390px frame: 20px inset, 14/18 type, 72px rows, keyline above Back/Next.
   Type and spacing stay on the Style tab; these are the defaults until a control is set. */
@media (max-width: 767px) {
  .tc-w-report {
    --tc-side: 20px;
  }

  .tc-w-report.is-open .tc-w-report__panel {
    gap: 0;
    padding-bottom: 24px;
  }

  .tc-w-report.is-open .tc-w-report__panel::after {
    opacity: 0;
  }

  .tc-w-report.is-open .tc-w-report__reveal {
    margin-top: 24px;
  }

  .tc-w-report__form {
    max-width: none;
  }

  .tc-w-report.is-open .tc-w-report__intro {
    margin: 0 0 16px;
    font-size: 14px;
    line-height: 18px;
  }

  .tc-w-report.is-open .tc-w-report__field {
    gap: 10px;
    min-height: 72px;
    padding: 0 0 12px;
    border-bottom: 0.5px solid color-mix(in srgb, currentColor 65%, transparent);
  }

  .tc-w-report.is-open .tc-w-report__label {
    width: 100px;
    font-size: 14px;
    line-height: 18px;
  }

  .tc-w-report.is-open .tc-w-report__field input {
    font-size: 14px;
    line-height: 18px;
  }

  .tc-w-report.is-open .tc-w-report__privacy {
    margin: 24px 0 0;
    text-align: left;
    font-size: 14px;
    line-height: 18px;
  }

  .tc-w-report__buttons {
    justify-content: flex-start;
    gap: 12px;
    padding-top: 24px;
  }

  .tc-w-report.is-open .tc-w-report__nav {
    justify-content: space-between;
    margin-top: 62px;
    padding-top: 24px;
    border-top: 0.5px solid color-mix(in srgb, currentColor 65%, transparent);
  }

  .tc-w-report.is-open :is(.tc-w-report__back, .tc-w-report__next) {
    padding: 8px 14px;
    font-size: 14px;
    line-height: 18px;
  }

  body.tangerine-theme .elementor-widget-tc-report-download .tc-w-report.is-open .tc-w-report__privacy-link {
    text-decoration: none;
  }

  /* Close and Download report share one cream pill. !important beats saved Elementor button colours. */
  .elementor-widget-tc-report-download .tc-w-report.is-open .tc-w-report__open,
  .elementor-widget-tc-report-download .tc-w-report.is-open .tc-w-report__open .tc-btn-label,
  .elementor-widget-tc-report-download .tc-w-report.is-open button.tc-w-report__submit,
  .elementor-widget-tc-report-download .tc-w-report.is-open button.tc-w-report__submit .tc-btn-label {
    box-sizing: border-box;
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid #fff9f5 !important;
    border-radius: 999px;
    background-color: #fff9f5 !important;
    background-image: none !important;
    color: #262626 !important;
    font-size: 14px;
    font-weight: 400;
    line-height: 18px;
    letter-spacing: 0;
    text-transform: uppercase;
    box-shadow: none;
  }

  .elementor-widget-tc-report-download .tc-w-report.is-open .tc-w-report__open .tc-btn-label,
  .elementor-widget-tc-report-download .tc-w-report.is-open button.tc-w-report__submit .tc-btn-label {
    min-height: 0;
    padding: 0;
    border: 0 !important;
    background: none !important;
  }

  .elementor-widget-tc-report-download .tc-w-report.is-open .tc-w-report__open .tc-btn-icon,
  .elementor-widget-tc-report-download .tc-w-report.is-open button.tc-w-report__submit .tc-btn-icon {
    display: none;
  }

  /* Touch keeps :hover after a tap. Only a real pointer should turn these pills red. */
  @media (hover: hover) {
    .elementor-widget-tc-report-download .tc-w-report.is-open .tc-w-report__open:hover,
    .elementor-widget-tc-report-download .tc-w-report.is-open button.tc-w-report__submit:hover {
      background-color: #f44349 !important;
      border-color: #f44349 !important;
      color: #262626 !important;
    }
  }
}

/* Focus left on Get the report keeps the red rollover and the focus ring. */
.tc-w-report:not(.is-open) .tc-w-report__open:is(:focus, :focus-visible):not(:hover) {
  outline: none;
  background-color: transparent !important;
  background-image: none !important;
  border-color: currentColor !important;
  color: inherit !important;
  transform: none !important;
}

/* A phone tap also leaves :hover after the finger is gone. */
@media (hover: none) {
  .tc-w-report:not(.is-open) .tc-w-report__open:is(:hover, :focus, :focus-visible) {
    outline: none;
    background-color: transparent !important;
    background-image: none !important;
    border-color: currentColor !important;
    color: inherit !important;
    transform: none !important;
  }

  .tc-w-report .tc-w-report__open:is(:focus, :focus-visible) {
    outline: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tc-w-report__panel,
  .tc-w-report__panel::after,
  .tc-w-report__reveal,
  .tc-w-report__reveal-inner {
    transition: none;
  }
}

/* Embedded Elementor form (Download form → Elementor form). Shared rules in common.css; these match the rows above. */
.tc-w-report {
  --tc-embed-line: currentColor;
  --tc-embed-ph-opacity: 1;
  --tc-embed-link-weight: inherit;
}

@media (max-width: 900px) {
  .tc-w-report {
    --tc-embed-label: 92px;
  }
}

@media (max-width: 767px) {
  .tc-w-report {
    --tc-embed-label: 100px;
    --tc-embed-row-min: 72px;
    --tc-embed-row-pad: 0px;
    --tc-embed-row-pad-bottom: 12px;
    --tc-embed-row-gap: 10px;
    --tc-embed-line-size: 0.5px;
    --tc-embed-line: color-mix(in srgb, currentColor 65%, transparent);
    --tc-embed-privacy-gap: 24px;
  }

  .tc-w-report .tc-form-embed--themed .elementor-field-type-html {
    text-align: left;
  }

  .tc-w-report .tc-form-embed--themed :is(.elementor-field-type-acceptance, .elementor-field-type-submit) {
    margin-left: 0 !important;
    padding-top: 24px;
  }

  .tc-w-report .tc-form-embed--themed .elementor-field-type-acceptance ~ .elementor-field-type-submit {
    margin-left: 12px !important;
  }

  .tc-w-report .tc-form-embed--themed .elementor-message {
    text-align: left;
  }

  /* Download report: same cream pill as the theme form's submit on phones. */
  .elementor-widget-tc-report-download .tc-w-report.is-open .tc-form-embed--themed .elementor-field-type-submit .elementor-button {
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid #fff9f5 !important;
    background-color: #fff9f5 !important;
    background-image: none !important;
    color: #262626 !important;
    font-size: 14px;
    line-height: 18px;
  }

  @media (hover: hover) {
    .elementor-widget-tc-report-download .tc-w-report.is-open .tc-form-embed--themed .elementor-field-type-submit .elementor-button:hover {
      background-color: #f44349 !important;
      border-color: #f44349 !important;
    }
  }
}

/* Download report: cream pill by default, like the theme form's submit (Style → Form buttons still wins). */
.tc-w-report .tc-form-embed--themed .elementor-form .elementor-field-type-submit .elementor-button[type="submit"] {
  background-color: var(--tangerine-cream, #fff9f5);
  color: var(--tangerine-charcoal, #262626);
  border-color: var(--tangerine-cream, #fff9f5);
}
