/**
 * Eltern-Arbeitsbereich (com_phfamily) - Schulfarben über die --ph-*-Tokens
 * aus media/pixelhobel/css/core.css.
 */

.phfamily-portal {
  max-width: 900px;
  margin: 0 auto;
}

.phfamily-lead {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

.phfamily-form {
  max-width: 480px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.phfamily-field {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

/* Gleicher Hausstil wie im Lehrer-Arbeitsbereich: fett, dunkel, normale Schreibweise. */
.phfamily-field > span {
  font-weight: 700;
  color: var(--ph-text);
}

.phfamily-field input {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  font: inherit;
  font-weight: 400;
}

.phfamily-hint {
  font-size: 0.9rem;
  color: var(--ph-text-muted, #555);
  margin: 0;
}

.phfamily-tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.phfamily-tile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  background: var(--ph-card-bg);
  color: var(--ph-text);
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.phfamily-tile:hover {
  border-color: var(--ph-primary);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.06);
}

.phfamily-tile__icon {
  flex: 0 0 auto;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: var(--ph-primary);
  color: #fff;
  font-size: 1.1rem;
}

.phfamily-tile__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
}

.phfamily-tile__meta {
  font-size: 0.85rem;
  color: var(--ph-text-muted, #666);
}

.phfamily-tile__chevron {
  flex: 0 0 auto;
  color: var(--ph-primary);
}

/* Fahrt-Eckdaten */
.phfamily-facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.4rem 1.5rem;
  padding: 0.9rem 1.1rem;
  margin: 0 0 1.5rem;
  background: var(--ph-card-bg);
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
}

.phfamily-facts > div {
  display: flex;
  flex-direction: column;
}

.phfamily-facts span {
  font-size: 0.82rem;
  color: var(--ph-text-muted, #666);
}

.phfamily-child {
  font-size: 1.05rem;
  margin-bottom: 1rem;
}

/* Schritt-Karten */
.phfamily-step {
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 1.1rem 1.25rem;
  margin-bottom: 1rem;
  background: var(--ph-bg);
}

.phfamily-step > h2 {
  margin-top: 0;
  font-size: 1.2rem;
}

.phfamily-step--locked {
  opacity: 0.55;
}

.phfamily-badge {
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  vertical-align: middle;
  margin-left: 0.4rem;
}

.phfamily-badge--done {
  background: color-mix(in srgb, var(--ph-secondary) 15%, #fff);
  color: var(--ph-secondary);
}

.phfamily-choice {
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  padding: 0.6rem 0.9rem;
  margin: 0 0 1rem;
}

.phfamily-choice legend {
  font-weight: 700;
  padding: 0 0.4rem;
  font-size: 0.95rem;
  width: auto;
}

.phfamily-choice label {
  display: block;
  margin: 0.3rem 0;
}

.phfamily-check {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0.5rem 0;
  line-height: 1.45;
}

.phfamily-check input {
  margin-top: 0.25rem;
  flex: 0 0 auto;
}

.phfamily-confirm {
  margin-top: 1rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--ph-border);
}

.phfamily-namegrid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  max-width: 460px;
}

.phfamily-sportlist {
  list-style: none;
  padding: 0;
  margin: 0 0 0.75rem;
}

.phfamily-sportlist li {
  padding: 0.2rem 0;
}

.phfamily-back {
  margin-top: 1.5rem;
}

/* ------------------------------------------------------------------ */
/* Schritt-Akkordeon A–E                                               */
/* ------------------------------------------------------------------ */
.phfamily-steps {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

/* Akkordeon-Variante überschreibt die Karten-Polsterung von .phfamily-step. */
details.phfamily-step {
  padding: 0;
  margin: 0;
  overflow: hidden;
}

details.phfamily-step > summary {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  background: var(--ph-primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

details.phfamily-step > summary::-webkit-details-marker {
  display: none;
}

details.phfamily-step > summary:focus-visible {
  outline: 3px solid var(--ph-accent);
  outline-offset: -3px;
}

.phfamily-step__num {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  background: #fff;
  color: var(--ph-primary);
  font-weight: 700;
}

.phfamily-step__title {
  flex: 1 1 auto;
}

.phfamily-step__hint {
  font-weight: 400;
  font-size: var(--ph-caption-size, 0.85rem);
  opacity: 0.85;
}

.phfamily-step__chev {
  flex: 0 0 auto;
  transition: transform 0.2s ease;
}

details.phfamily-step[open] > summary .phfamily-step__chev {
  transform: rotate(180deg);
}

/* Erledigt: Farben invertiert - identisch zum Lehrer-Arbeitsbereich. */
details.phfamily-step.is-done > summary {
  background: color-mix(in srgb, var(--ph-primary) 7%, #fff);
  color: var(--ph-primary);
}

details.phfamily-step.is-done > summary .phfamily-step__num {
  background: var(--ph-primary);
  color: #fff;
}

.phfamily-step--locked > summary {
  opacity: 0.45;
  cursor: not-allowed;
}

.phfamily-facts--stack {
  display: block;
}

.phfamily-facts--stack > div {
  flex-direction: row;
  gap: 0.5rem;
  padding: 0.2rem 0;
  border-bottom: 1px dotted var(--ph-border);
}

.phfamily-facts--stack span {
  flex: 0 0 150px;
}

/* Formularfelder (select/textarea wie input) */
.phfamily-field select,
.phfamily-field textarea {
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  font: inherit;
  font-weight: 400;
}

.phfamily-field--wide {
  flex: 1 1 260px;
}

.phfamily-recordrow {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}

.phfamily-recordrow .phfamily-field {
  flex: 1 1 140px;
}

.phfamily-list {
  margin: 0 0 0.5rem;
  padding-left: 1.2rem;
}

.phfamily-list li {
  padding: 0.15rem 0;
}

.phfamily-packing {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 220px 2;
}

.phfamily-legalinfo {
  margin-top: 1rem;
  padding: 0.8rem 1rem;
  border: 1px solid var(--ph-accent);
  border-left-width: 4px;
  border-radius: var(--ph-radius);
  background: color-mix(in srgb, var(--ph-accent) 10%, #fff);
}

/* Unterschrift-Feld */
.phfamily-sig {
  margin-top: 1rem;
}

.phfamily-sig__label {
  display: block;
  font-size: 0.9rem;
  color: var(--ph-text-muted, #555);
  margin-bottom: 0.35rem;
}

.phfamily-sig__pad {
  width: 100%;
  max-width: 460px;
  height: 180px;
  border: 1px dashed var(--ph-primary);
  border-radius: var(--ph-radius);
  background: #fff;
  touch-action: none;
  display: block;
}

.phfamily-sig__actions {
  margin: 0.4rem 0 0;
}

.phfamily-sig__img {
  max-width: 320px;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  background: #fff;
  margin: 0.5rem 0;
}


/* Packliste: Kategorie-Überschriften */
.phfamily-packing__cat {
  font-size: 1rem;
  margin: 1rem 0 0.25rem;
  color: var(--ph-primary);
}

/* ------------------------------------------------------------------ */
/* Mobil: Schritt-Kopfzeilen kompakt halten                            */
/* ------------------------------------------------------------------ */
.phfamily-step__title {
  line-height: 1.25;
}

@media (max-width: 640px) {
  .phfamily-portal {
    padding: 0;
  }

  details.phfamily-step > summary {
    padding: 0.65rem 0.75rem;
    gap: 0.5rem;
    font-size: 0.95rem;
  }

  .phfamily-step__num {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.82rem;
  }

  .phfamily-step__hint {
    font-size: 0.72rem;
    white-space: nowrap;
  }

  .phfamily-step__body {
    padding: 0.25rem 0.75rem 1rem;
  }

  .phfamily-facts {
    padding: 0.7rem 0.8rem;
    gap: 0.3rem 0.8rem;
    margin-bottom: 1rem;
  }

  .phfamily-namegrid {
    grid-template-columns: 1fr;
  }

  .phfamily-packing {
    columns: 1;
  }

  .phfamily-child {
    font-size: 0.98rem;
  }
}

/* Sehr schmale Geräte: Status ausblenden, Titel bekommt den Platz. */
@media (max-width: 380px) {
  .phfamily-step__hint {
    display: none;
  }
}

/* ------------------------------------------------------------------ */
/* Zahlungsdaten                                                       */
/* ------------------------------------------------------------------ */
.phfamily-pay {
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  background: #fff;
  overflow: hidden;
  margin: 0 0 1.25rem;
}

.phfamily-pay__row {
  display: grid;
  grid-template-columns: 170px 1fr;
  align-items: center;
  gap: 0.25rem 1rem;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--ph-border);
}

.phfamily-pay__row:last-child {
  border-bottom: 0;
}

.phfamily-pay__label {
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ph-text-muted, #6b6b6b);
}

.phfamily-pay__value {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  min-width: 0;
}

.phfamily-pay__value span {
  flex: 1 1 auto;
  min-width: 0;
  overflow-wrap: anywhere;
  font-variant-numeric: tabular-nums;
}

.phfamily-pay__row.is-amount .phfamily-pay__value {
  font-size: 1.35rem;
  color: var(--ph-primary);
}

.phfamily-pay__copy {
  flex: 0 0 auto;
  width: 2.3rem;
  height: 2.3rem;
  border: 1px solid var(--ph-border);
  border-radius: var(--ph-radius);
  background: var(--ph-card-bg);
  color: var(--ph-primary);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.phfamily-pay__copy:hover,
.phfamily-pay__copy:focus-visible {
  border-color: var(--ph-primary);
  background: #fff;
  outline: none;
}

.phfamily-pay__head {
  font-size: 0.95rem;
  margin: 1.1rem 0 0.3rem;
}

.phfamily-pay__list {
  margin: 0 0 0.5rem;
  padding-left: 1.1rem;
  font-size: 0.95rem;
}

.phfamily-pay__list li {
  padding: 0.12rem 0;
}

@media (max-width: 640px) {
  .phfamily-pay__row {
    grid-template-columns: 1fr;
    padding: 0.6rem 0.75rem;
  }

  .phfamily-pay__row.is-amount .phfamily-pay__value {
    font-size: 1.2rem;
  }
}
