/* Symptom cards: an h3 card whose closing link is a booking link carrying ?notes=.
   structure.php renders them as native <details> so they collapse with no script.
   The grid that holds them is single-column, so opening one never stretches a neighbour. */

.card-grid--symptoms {
  grid-template-columns: 1fr;
  gap: var(--space-sm);
  max-width: 820px;
}

.card--symptom { padding: 0; }
.card--symptom > summary {
  list-style: none;
  position: relative;
  display: block;
  padding: 22px 64px 22px 24px;
  cursor: pointer;
  border-radius: 6px;
}
.card--symptom > summary::-webkit-details-marker { display: none; }
.card--symptom > summary::after {
  content: "+";
  position: absolute;
  right: 24px;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-ui);
  font-size: 26px;
  line-height: 1;
  color: var(--navy-800);
}
.card--symptom[open] > summary::after { content: "\2212"; }
.card--symptom > summary h3 { margin: 0; transition: color 0.15s ease; }
.card--symptom > summary:hover h3 { color: var(--navy-800); }

.card--symptom .card-body { padding: 0 24px 28px; }
.card--symptom .card-body > p:first-child,
.symptom-panels .card-body > p:first-child { margin-top: 0; }

/* The booking link inside an open symptom card is the page's action: a button, not an arrow link. */
.card--symptom .card-link,
.symptom-panels .card-link { margin-top: var(--space-md); }
.card--symptom .card-link a,
.symptom-panels .card-link a {
  display: inline-block;
  padding: 14px 28px;
  background: var(--navy-800);
  color: #fff;
  font-family: var(--font-ui-strong);
  font-size: 14px;
  line-height: 1;
  border-radius: 4px;
  text-decoration: none;
}
.card--symptom .card-link a::after,
.symptom-panels .card-link a::after { content: none; }
.card--symptom .card-link a:hover,
.symptom-panels .card-link a:hover { background: var(--navy-700); text-decoration: none; }

@media (max-width: 767px) {
  .card--symptom > summary { padding: 18px 52px 18px 20px; }
  .card--symptom > summary::after { right: 20px; }
  .card--symptom .card-body { padding: 0 20px 24px; }
  .card--symptom .card-link a { display: block; text-align: center; }
}

/* Wide screens, once symptoms.js has run: questions in the outer columns, the chosen answer in the
   middle. .is-tabbed exists only while the script is in charge, so nothing here can reach the
   stacked cards. The panel is a .card (white, Signal top rule) and grows the row only by its own height. */
@media screen and (min-width: 1025px) {
  .card-grid--symptoms.is-tabbed {
    grid-template-columns: minmax(0, 1fr) minmax(0, 2fr) minmax(0, 1fr);
    max-width: none;
  }
  .symptom-tabs {
    grid-column: 1 / -1;
    grid-row: 1;
    display: grid;
    grid-template-columns: subgrid;
    grid-auto-flow: row dense;
    align-content: start;
    row-gap: var(--space-sm);
  }
  .symptom-tabs > .card--symptom { grid-column: 1; }
  .symptom-tabs > .symptom-tab--right { grid-column: 3; }
  .symptom-panels {
    position: relative;
    grid-column: 2;
    grid-row: 1;
    padding: 32px;
  }
  .symptom-prompt {
    margin: 0;
    font-family: var(--font-ui);
    font-size: 17px;
    color: var(--linen-600);
  }
  .is-tabbed .card--symptom > summary { padding: 18px 20px; }
  .is-tabbed .card--symptom > summary::after { content: none; }
  .is-tabbed .card--symptom > summary h3 { font-size: 16px; line-height: 1.4; }
  .is-tabbed .card--symptom.is-selected { box-shadow: 0 0 0 1px var(--navy-800); }
  .is-tabbed .card--symptom.is-selected > summary h3 { color: var(--navy-800); }
}

@media print {
  .card--symptom > summary::after { content: none; }
}
