/* Priser: sammanfattning och prislista. Laddas efter pages.css.
   Inga texter via content:. Inga fasta bredder på textceller. */

.page-hero.text-only .ingress + .ingress { margin-top: var(--space-4); }

.price-summary, .price-list { padding: var(--space-8) 0; }
.price-summary { background: var(--white); }
.price-list { background: var(--paper); }
.price-summary .inner, .price-list .inner {
  display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 32px 64px; align-items: start;
}
.price-list .inner { grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); }
.price-summary .head, .price-list .head { position: sticky; top: 141px; }
.price-summary h2, .price-list h2 {
  font-size: var(--fs-h2); line-height: 1.15; letter-spacing: -0.02em; font-weight: 450;
  margin-bottom: 16px; text-wrap: balance;
}

/* Tabeller */
.price-summary table, .price-group table { width: 100%; border-collapse: collapse; }
.price-summary th, .price-group th {
  text-align: left; font-size: var(--fs-small); font-weight: 500; color: var(--fg-muted);
  padding: 10px 16px 10px 0; border-bottom: 1px solid var(--border-strong);
}
.price-summary td, .price-group td {
  padding: 14px 16px 14px 0; border-bottom: 1px solid var(--border); vertical-align: baseline;
  font-size: var(--fs-body); line-height: 1.45; overflow-wrap: anywhere; hyphens: auto;
}
.price-summary th:last-child, .price-group th:last-child,
.price-summary td:last-child, .price-group td:last-child { padding-right: 0; text-align: right; }
.price-summary .code, .price-group .code, .price-summary th:nth-child(2), .price-group th:nth-child(2) {
  font-size: var(--fs-small); color: var(--fg-muted); white-space: normal; overflow-wrap: anywhere;
}
.price-summary td.price, .price-group td.price {
  white-space: nowrap; text-align: right; font-weight: 500; color: var(--fg-strong);
  font-variant-numeric: tabular-nums;
}
.price-summary td a {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--fg-strong); font-weight: 500;
  text-decoration: underline; text-decoration-color: var(--border-strong); text-underline-offset: 4px;
  text-decoration-thickness: 1px; transition: color .2s ease;
}
.price-summary td a:hover { color: var(--blush-700); text-decoration-color: currentColor; }
.price-summary .note { margin-top: var(--space-5); font-size: var(--fs-small); color: var(--fg-muted); max-width: 46em; }

/* Grupper (details) */
.price-list .groups { border-top: 1px solid var(--border-strong); }
.price-group { border-bottom: 1px solid var(--border-strong); }
.price-group summary {
  display: flex; align-items: center; gap: 16px; min-height: 56px; padding: 18px 0;
  cursor: pointer; list-style: none; font-size: var(--fs-h4); line-height: 1.4; font-weight: 450; color: var(--fg-strong);
}
.price-group summary::-webkit-details-marker { display: none; }
.price-group summary:hover { color: var(--blush-700); }
.price-group summary:focus-visible { outline: 2px solid var(--logo); outline-offset: 2px; }
.price-group .g-title { flex: 1 1 auto; min-width: 0; }
.price-group .g-count { font-size: var(--fs-small); color: var(--fg-muted); font-variant-numeric: tabular-nums; }
.price-group .pm { position: relative; flex: 0 0 20px; width: 20px; height: 20px; }
.price-group .pm::before, .price-group .pm::after {
  content: ""; position: absolute; left: 2px; right: 2px; top: 9px; height: 2px;
  border-radius: 2px; background: var(--blush-600); transition: transform .2s ease;
}
.price-group .pm::after { transform: rotate(90deg); }
.price-group[open] .pm::after { transform: rotate(0deg); }
.price-group table { margin-bottom: var(--space-5); }
.price-group td:first-child { max-width: 40em; }
@media (prefers-reduced-motion: reduce) { .price-group .pm::before, .price-group .pm::after { transition: none; } }

@media (max-width: 900px) {
  .price-summary, .price-list { padding: var(--space-7) 0; }
  .price-summary .inner, .price-list .inner { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .price-summary .head, .price-list .head { position: static; }
}

/* Mobil: varje rad blir ett litet kort. Namn överst, kod till vänster och pris till höger. */
@media (max-width: 600px) {
  .price-summary table, .price-group table, .price-summary tbody, .price-group tbody { display: block; }
  .price-summary thead, .price-group thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
  }
  .price-summary tr, .price-group tr {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; column-gap: 16px; row-gap: 2px;
    padding: 14px 0; border-bottom: 1px solid var(--border);
  }
  .price-summary td, .price-group td { display: block; padding: 0; border: 0; }
  .price-summary td:first-child, .price-group td:first-child { grid-column: 1 / -1; max-width: none; }
  .price-summary td:first-child a { min-height: 44px; }
  .price-summary .code, .price-group .code { grid-column: 1; grid-row: 2; align-self: baseline; }
  .price-summary td.price, .price-group td.price { grid-column: 2; grid-row: 2; align-self: baseline; }
  .price-summary tr:last-child, .price-group tr:last-child { border-bottom: 0; }
  .price-group summary { font-size: 17px; }
}

/* Finputs: alla grupper stängda från start (överblick), tätare på låga skärmar */
.price-summary, .price-list { padding: clamp(40px, 7vh, 80px) 0; }
@media (min-width: 1024px) and (max-height: 820px) {
  .price-summary td, .price-summary th { padding-top: 9px; padding-bottom: 9px; }
}

/* Länkar till behandlingssidor överst i en öppnad grupp */
.price-group .group-links { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0 0 var(--space-4); }
/* Länkarna i prisgrupperna får samma indrag som gruppens rubrik och tabell */
.price-group .group-links { padding-inline: 20px; }
@media (max-width: 600px) { .price-group .group-links { padding-inline: 16px; } }
