/* Tab Panels block — Figma 1293-30712 (light) / 1304-31229 (dark).
   Exact desktop values; responsive below. */
.sun-tp { display: block; }
.sun-tp--dark { background: var(--sun-secondary); }        /* #132140 */

.sun-tp__inner {
  box-sizing: border-box;
  width: min(1280px, 100% - 48px);
  margin-inline: auto;
  padding-block: clamp(56px, 6.5vw, 100px);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 48px;
}

/* ---- Optional section header (label + H2 + subhead), centered ---- */
.sun-tp__head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  max-width: 800px;
  text-align: center;
}
.sun-tp__label {
  margin: 0;
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 3.5px 8px 4.5px;
  border: 1px solid var(--sun-primary);
  border-radius: 4px;
  background: #fff1e7;
  font-family: var(--wp--preset--font-family--brand);
  font-size: 12px;
  font-weight: 500;
  line-height: 1.3333;
  color: #733305;
}
.sun-tp--dark .sun-tp__label { background: var(--sun-primary); color: var(--sun-base); }
.sun-tp__heading {
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-size: clamp(29px, 3.75vw, 48px);
  font-weight: 500;
  line-height: 1.1667;
  letter-spacing: -0.48px;
  color: var(--sun-secondary);
}
.sun-tp__accent { color: var(--sun-primary); }
.sun-tp--dark .sun-tp__heading,
.sun-tp--dark .sun-tp__accent { color: var(--sun-base); }   /* orange reads muddy on navy */
.sun-tp__subhead {
  margin: 4px 0 0;
  max-width: 760px;
  font-family: var(--wp--preset--font-family--brand);
  font-size: clamp(14px, 1.41vw, 18px);
  font-weight: 500;
  line-height: 1.3334;
  color: var(--sun-bluegrey);
}
.sun-tp--dark .sun-tp__subhead { color: var(--sun-border); } /* #efefef */

/* ---- Body: tabs column + panel ---- */
.sun-tp__body {
  display: flex;
  align-items: flex-start;
  gap: 48px;
  width: 100%;
}
.sun-tp--light .sun-tp__tabs   { flex: 0 0 416px; }
.sun-tp--light .sun-tp__panels { flex: 1 1 0; }
.sun-tp--dark  .sun-tp__tabs   { flex: 1 1 0; }
.sun-tp--dark  .sun-tp__panels { flex: 0 0 416px; }
.sun-tp--dark  .sun-tp__body   { align-items: stretch; }
.sun-tp__tabs, .sun-tp__panels { min-width: 0; }

/* Tabs */
.sun-tp__tabs {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.sun-tp__tab {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
  width: 100%;
  padding: 24px;
  border: 1px solid var(--sun-muted);                        /* #b6bac4 */
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.2);
  text-align: left;
  cursor: pointer;
  color: var(--sun-secondary);
  transition: border-color .2s ease, color .2s ease;
}
.sun-tp__tab:hover { border-color: var(--sun-bluegrey); }
.sun-tp__tab[aria-selected="true"],
.sun-tp__tab[aria-selected="true"]:hover { border-color: var(--sun-primary); color: var(--sun-primary); }
.sun-tp__tab:focus-visible { outline: 3px solid var(--sun-accent); outline-offset: 2px; }
.sun-tp--dark .sun-tp__tab {
  border-color: var(--sun-bluegrey);                         /* #4f5563 */
  background: rgba(79, 85, 99, 0.2);
  color: var(--sun-base);
}
.sun-tp--dark .sun-tp__tab:hover { border-color: var(--sun-muted); }
.sun-tp--dark .sun-tp__tab[aria-selected="true"],
.sun-tp--dark .sun-tp__tab[aria-selected="true"]:hover { border-color: var(--sun-primary); color: var(--sun-primary); }

.sun-tp__tab-row {
  display: flex;
  align-items: flex-start;
  gap: 24px;
  width: 100%;
}
.sun-tp__tab-title {
  flex: 1 1 auto;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 24px;
  line-height: 32px;
}
/* Descendant selectors beat the global `.sun-icon { width: 1em }` from tokens.css. */
.sun-tp .sun-tp__tab-arrow {
  flex: 0 0 auto;
  display: block;
  width: 32px;
  height: 32px;
  fill: currentColor;
  transition: transform .2s ease;
}
.sun-tp__tab[aria-selected="true"] .sun-tp__tab-arrow { transform: translateX(4px); }
.sun-tp__tab-desc {
  font-family: var(--wp--preset--font-family--brand);
  font-size: 16px;
  line-height: 24px;
  color: var(--sun-bluegrey);
}
.sun-tp--dark .sun-tp__tab-desc { color: var(--sun-border); }  /* #efefef */

/* Panel (white rounded text box) */
.sun-tp__panel {
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 24px;
  height: 100%;
  padding: 40px;
  border-radius: 24px;
  background: var(--sun-base);
  color: var(--sun-secondary);
}
.sun-tp__panel[hidden] { display: none; }
.sun-tp .sun-tp__panel-icon {
  display: block;
  width: 32px;
  height: 32px;
  color: var(--sun-primary);
  fill: currentColor;
}
.sun-tp__panel-heading {
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-weight: 500;
  font-size: 32px;
  line-height: 40px;
  letter-spacing: -0.16px;
  color: var(--sun-secondary);
}
.sun-tp__panel-text,
.sun-tp__panel-text p {
  margin: 0;
  font-family: var(--wp--preset--font-family--brand);
  font-size: 18px;
  line-height: 24px;
  color: var(--sun-secondary);
}
.sun-tp__panel-text p + p { margin-top: 24px; }
.sun-tp__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sun-tp__item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.sun-tp .sun-tp__check {
  flex: 0 0 auto;
  display: block;
  width: 24px;
  height: 24px;
  color: var(--sun-primary);
  fill: currentColor;
}
.sun-tp__item-text {
  font-family: var(--wp--preset--font-family--brand);
  font-size: 16px;
  line-height: 24px;
  color: var(--sun-secondary);
}

/* Panel swap: fade the incoming panel in. */
@media (prefers-reduced-motion: no-preference) {
  .sun-tp__panel { animation: sun-tp-in .3s ease; }
  @keyframes sun-tp-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* ---- Responsive ---- */
@media (max-width: 1100px) {
  .sun-tp--light .sun-tp__tabs,
  .sun-tp--dark  .sun-tp__panels { flex-basis: 360px; }
  .sun-tp__panel { padding: 32px; }
  .sun-tp__panel-heading { font-size: 28px; line-height: 36px; }
}
@media (max-width: 900px) {
  /* Accordion-like stack (Figma 375w 1406-13694): the open panel sits directly
     under its tab, the remaining tabs follow. The two wrappers dissolve
     (display: contents) so tabs and panels interleave via --i from the template. */
  .sun-tp__body { display: flex; flex-direction: column; gap: 16px; }
  .sun-tp__tabs, .sun-tp__panels { display: contents; }
  .sun-tp__tab   { order: calc(var(--i) * 2); }
  .sun-tp__panel { order: calc(var(--i) * 2 + 1); }

  .sun-tp__tab { padding: 16px; border-radius: 16px; gap: 16px; }
  .sun-tp__tab-title { font-size: 18px; line-height: 24px; }
  .sun-tp__tab-desc  { font-size: 14px; line-height: 20px; }
  .sun-tp .sun-tp__tab-arrow { width: 24px; height: 24px; }
  /* Open tab: arrow points down at the panel below. */
  .sun-tp__tab[aria-selected="true"] .sun-tp__tab-arrow { transform: rotate(90deg); }

  .sun-tp__panel { padding: 20px; border-radius: 24px; gap: 16px; height: auto; }
  .sun-tp__panel-heading { font-size: 24px; line-height: 32px; letter-spacing: 0; }
  .sun-tp__panel-text, .sun-tp__panel-text p { font-size: 16px; line-height: 24px; }
  .sun-tp .sun-tp__check { width: 16px; height: 16px; margin-top: 2px; }
  .sun-tp__item-text { font-size: 14px; line-height: 20px; }
}
