/* ===================================
   QUESTION ANSWERS: THE ACCORDION BELOW THE CARDS
   Loaded by question-cards.ejs next to question-cards.css (which holds the section tokens this
   file reads). Two parts:
   1. The rich answers of the first two entries: the refund entry (a lead line, one white row per
      way to submit an invoice with an icon, a label and the address or store links, the forwarding
      row on mint, the processing-time notice, the detail paragraphs) and the eligibility entry
      (check / x tiles, white with a hairline).
   2. The overrides of the site-standard accordion (ratgeber/components/faq-box, styled site-wide
      by content/faq-accordion.css), scoped under .tariff-questions__more: white entries with a
      hairline and a soft shadow, the question in the page typeface, the chevron glyph on a small
      ghost disc, and an answer that grows as one grid track from 0fr to 1fr (faq-accordion.css
      animates a max-height instead). The track is the .tariff-questions__faq-body wrapper that
      question-cards.ejs puts around every answer. The selectors carry three classes so they
      outrank faq-accordion.css, which the page links after this file.
   Mobile first: the base rules are the 375 px layout, wider layouts come through min-width.
   The campaign host renders the accordion as <details> (components/faq-list, public-design.css);
   only part 1 applies there.
   =================================== */

/* --- Refund entry: lead line, one row per way to submit an invoice, notice, details --- */
.tariff-questions__rich {
  display: grid;
  gap: 12px;
  min-width: 0;
}
/* The campaign host styles every answer paragraph and link (public-design.css: .public-faq-answer p,
   .public-faq-answer a); the rows, store links and paragraphs keep their own look on both hosts. */
.tariff-questions__rich :is(.tariff-questions__lead, .tariff-questions__notice, .tariff-questions__detail) {
  margin: 0;
}
.tariff-questions__rich a.tariff-questions__way {
  color: var(--tp-ink);
  text-decoration: none;
}
.tariff-questions__rich a.tariff-questions__store {
  color: var(--tp-accent);
  text-decoration: none;
}
.tariff-questions__rich a.tariff-questions__store:hover {
  text-decoration: underline;
}
.tariff-questions__lead {
  margin: 0;
  font-size: 15px;
  line-height: 1.5;
  color: var(--tp-ink-2);
}
/* One way per row; rows never wider than the entry, long addresses wrap. */
.tariff-questions__ways {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
  min-width: 0;
}
.tariff-questions__way {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  max-width: 100%;
  min-height: 60px;
  padding: 10px 12px;
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-r-md);
  background: var(--tp-paper);
  color: var(--tp-ink);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease, box-shadow 0.2s ease;
}
a.tariff-questions__way:hover {
  border-color: var(--tp-accent);
  box-shadow: var(--tp-shadow);
  color: var(--tp-ink);
}
.tariff-questions__way--accent {
  background: var(--tp-mint);
  border-color: var(--tp-line-accent);
}
a.tariff-questions__way--accent:hover {
  background: color-mix(in srgb, var(--tp-mint) 80%, var(--tp-accent));
}
.tariff-questions__way-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--tp-mint);
  color: var(--tp-accent);
}
.tariff-questions__way--accent .tariff-questions__way-icon {
  background: var(--tp-accent);
  color: #FFFFFF;
}
.tariff-questions__way-icon .tariff-questions__icon {
  width: 20px;
  height: 20px;
}
.tariff-questions__way-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.tariff-questions__way-label {
  font-size: 14.5px;
  font-weight: 700;
  line-height: 1.3;
  color: var(--tp-ink);
  overflow-wrap: anywhere;
}
.tariff-questions__way-value {
  font-size: 13.5px;
  line-height: 1.35;
  color: var(--tp-ink-3);
  overflow-wrap: anywhere;
}
.tariff-questions__way-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 14px;
}
.tariff-questions__store {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--tp-accent);
  text-decoration: none;
}
.tariff-questions__store:hover {
  text-decoration: underline;
}
.tariff-questions__notice {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.45;
  color: var(--tp-ink-3);
}
.tariff-questions__detail {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--tp-ink-2);
}

/* --- Eligibility entry: white tiles with a check or x disc --- */
.tariff-questions__eligibility {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 8px;
}
.tariff-questions__eligibility-item {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px 12px 10px 10px;
  border: 1px solid var(--tp-line);
  border-radius: var(--tp-r-md);
  background: var(--tp-paper);
  color: var(--tp-ink);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.tariff-questions__eligibility-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--tp-mint);
  color: var(--tp-accent);
}
.tariff-questions__eligibility-icon .tariff-questions__icon {
  width: 15px;
  height: 15px;
  stroke-width: 2.25;
}
.tariff-questions__eligibility-item[data-ok="false"] {
  color: var(--tp-grey-ink);
}
.tariff-questions__eligibility-item[data-ok="false"] .tariff-questions__eligibility-icon {
  background: var(--tp-grey-tile);
  color: var(--tp-grey-ink);
}

/* --- The accordion (site-standard markup from ratgeber/components/faq-box) --- */
/* Inside the question card: the further questions follow under a hairline, their entries are
   rows of the card (hairlines between them) instead of separate boxes. */
.tariff-questions__more {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--tp-line);
  overflow-wrap: anywhere;
}
.tariff-questions__more-title {
  margin: 0;
  font-size: 18px;
  font-weight: 800;
  letter-spacing: -0.2px;
  text-align: left;
  color: var(--tp-ink);
}
/* faq-box centres itself at 800px through an inline style; the list fills the card here. */
.tariff-questions__more .faq-section {
  max-width: none !important;
  margin: 0 !important;
}
.tariff-questions__more .faq-section .faq-accordion {
  margin-bottom: 0;
  border: 0;
  border-bottom: 1px solid var(--tp-line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  overflow: hidden;
}
.tariff-questions__more .faq-section .faq-accordion:last-child {
  border-bottom: 0;
}
.tariff-questions__more .faq-accordion .faq-question {
  gap: 12px;
  padding: 16px 0;
  background: var(--tp-paper);
  font-family: inherit;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -0.1px;
  color: var(--tp-ink);
  transition: background-color 0.2s ease;
}
.tariff-questions__more .faq-accordion .faq-question:hover {
  background: color-mix(in srgb, var(--tp-mint) 45%, var(--tp-paper));
}
.tariff-questions__more .faq-accordion .faq-question.active {
  background: var(--tp-paper);
}
/* The glyph sits on a small ghost disc that turns mint on hover and rotates when open. */
.tariff-questions__more .faq-accordion .faq-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 1px solid var(--tp-line);
  border-radius: 50%;
  background: var(--tp-paper);
  font-size: 11px;
  line-height: 1;
  color: var(--tp-accent);
  transition: transform var(--tp-motion) var(--tp-ease), background-color 0.2s ease, border-color 0.2s ease;
}
.tariff-questions__more .faq-accordion .faq-question:hover .faq-icon,
.tariff-questions__more .faq-accordion .faq-icon.active {
  background: var(--tp-mint);
  border-color: var(--tp-line-accent);
}
.tariff-questions__more .faq-accordion .faq-icon.active {
  transform: rotate(180deg);
}
/* The answer grows as one grid track; the max-height of faq-accordion.css plays no part here. */
.tariff-questions__more .faq-accordion .faq-answer {
  display: grid;
  grid-template-rows: 0fr;
  max-height: none;
  padding: 0;
  opacity: 0;
  background: var(--tp-paper);
  font-family: inherit;
  transition: grid-template-rows var(--tp-motion) var(--tp-ease), opacity 0.24s ease, padding var(--tp-motion) var(--tp-ease);
}
.tariff-questions__more .faq-accordion .faq-answer.active {
  grid-template-rows: 1fr;
  padding: 16px;
  opacity: 1;
}
.tariff-questions__more .tariff-questions__faq-body {
  min-height: 0;
  overflow: hidden;
}
.tariff-questions__more .faq-answer p {
  color: var(--tp-ink-2);
  font-size: 15px;
  line-height: 1.55;
}
.tariff-questions__more .faq-answer a {
  color: var(--tp-accent);
}

/* --- Wider layouts --- */
@media (min-width: 481px) {
  .tariff-questions__eligibility {
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  }
  .tariff-questions__more .faq-accordion .faq-question {
    padding: 16px 18px;
  }
  .tariff-questions__more .faq-accordion .faq-answer {
    padding: 0 18px;
  }
  .tariff-questions__more .faq-accordion .faq-answer.active {
    padding: 18px;
  }
}

@media (min-width: 640px) {
  .tariff-questions__ways {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .tariff-questions__way {
    padding: 10px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tariff-questions__way,
  .tariff-questions__more .faq-section .faq-accordion,
  .tariff-questions__more .faq-accordion .faq-question,
  .tariff-questions__more .faq-accordion .faq-icon,
  .tariff-questions__more .faq-accordion .faq-answer {
    transition: none;
  }
}
