/* =====================================================================
 * Trainerbereich, Check-in und Kontomenue auf dem Handy
 *
 * Kommt aus fy-bereich.php. Trainer bedienen diese Seiten fast nur am
 * Handy, deshalb ist die schmale Ansicht der Normalfall: grosse
 * Tippflaechen, eine Spalte, keine Tabellen.
 * ===================================================================== */

/* Die QR-Grafik braucht in beiden Modi dunkle Punkte auf hellem Grund,
 * sonst lesen Handykameras sie nicht. --fy-ink wird im hellen Modus zu
 * Stein und taugt dafuer nicht. */
html:root {
  --fy-qr-punkt: #0B0B0C;
  --fy-qr-grund: #FFFFFF;
  /* Erfolg, etwa nach dem Einchecken. Rot bleibt Marke und Fehler.
   * Kontrast gemessen: 5,3:1 auf Weiss, 4,7:1 auf Papier. */
  --fy-ok: #1E7B45;
  --fy-ok-grund: rgba(30, 123, 69, 0.08);
}

/* --- Kontomenue auf dem Handy: zwei Spalten statt einer langen Liste -- */
@media (max-width: 767px) {
  .woocommerce-account .woocommerce-MyAccount-navigation ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .woocommerce-account .woocommerce-MyAccount-navigation li a {
    min-height: 44px;
    padding: 0.6rem 0.75rem;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    white-space: normal;
  }

  .woocommerce-account .woocommerce-MyAccount-navigation-link--customer-logout {
    grid-column: 1 / -1;
  }
}

/* --- Meldungen: Symbol links neben dem Text, nicht darueber ------------
 * WooCommerce setzt das Symbol auf 1.5em vom Rand, fy-account.css hatte den
 * Innenabstand darunter verkleinert. Beides wird hier aufeinander abgestimmt. */
.woocommerce-account .woocommerce-message,
.woocommerce-account .woocommerce-info,
.woocommerce-account .woocommerce-error {
  padding-left: 3.25rem;
}

.woocommerce-account .woocommerce-message::before,
.woocommerce-account .woocommerce-info::before,
.woocommerce-account .woocommerce-error::before {
  left: 1.1rem;
  top: var(--fy-space-3);
}

/* --- Check-in, Station, Heute: der Inhalt zuerst ------------------- */
body.fy-inhalt-zuerst .fy-pagehead {
  padding-bottom: 1.5rem;
}

body.fy-inhalt-zuerst .fy-pagehead .fy-h1 {
  font-size: var(--fy-t-h2);
}

@media (max-width: 1023px) {
  body.fy-inhalt-zuerst .woocommerce-MyAccount-content {
    order: 1;
  }

  body.fy-inhalt-zuerst .woocommerce-MyAccount-navigation {
    order: 2;
  }
}

.fy-bereich-aktionen select {
  min-height: 44px;
  min-width: 12rem;
  padding: 0.4rem 0.6rem;
}

.fy-checkin-erklaerung {
  max-width: 62ch;
  margin: var(--fy-space-2) 0;
  font-size: var(--fy-t-small);
  color: var(--fy-slate);
}

/* --- Station: Wahl der laufenden Leistung ----------------------------- */
.fy-station-wahl {
  margin: 0 0 var(--fy-space-3);
}

.fy-station-wahl-titel {
  margin: 0 0 0.5rem;
  font-family: var(--fy-font-util), sans-serif;
  font-size: var(--fy-t-label);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--fy-slate);
}

.fy-station-wahl ul {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.woocommerce-account .fy-station-wahl-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 0.9rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--fy-font-util), sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  background: var(--fy-paper-raised);
  border: 1px solid var(--fy-line-paper);
  border-radius: var(--fy-r-sm);
}

.woocommerce-account .fy-station-wahl-link.fy-station-wahl-aktiv {
  color: var(--fy-crimson);
  border-color: var(--fy-crimson);
  border-width: 2px;
}

.fy-station-leistung {
  margin: 0;
  font-family: var(--fy-font-display), sans-serif;
  font-size: var(--fy-t-h3);
  font-weight: 700;
}

/* --- Bloecke und Listen ---------------------------------------------- */
.fy-heute-kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
  margin: 0 0 var(--fy-space-3);
  padding-bottom: var(--fy-space-2);
  border-bottom: 1px solid var(--fy-line-paper);
}

.fy-bereich-block {
  margin: 0 0 var(--fy-space-4);
}

.fy-suche {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0.75rem;
  margin: 0 0 var(--fy-space-2);
}

.fy-suche .fy-label {
  flex: 1 1 16rem;
  min-width: 0;
}

.fy-suche input[type="search"] {
  width: 100%;
  min-height: 48px;
}

.fy-bereich-liste,
.fy-station-liste {
  display: flex;
  flex-direction: column;
  gap: var(--fy-space-1, 0.5rem);
  margin: 0;
  padding: 0;
  list-style: none;
}

.fy-bereich-eintrag {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: var(--fy-space-2);
  background: var(--fy-paper-raised);
  border: 1px solid var(--fy-line-paper);
  border-radius: var(--fy-r-md);
  box-shadow: var(--fy-shadow-card);
}

.fy-bereich-eintrag-text {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.fy-bereich-name {
  font-family: var(--fy-font-display), sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.25;
}

.fy-bereich-meta {
  font-size: var(--fy-t-small);
  line-height: 1.45;
  color: var(--fy-slate);
}

.fy-bereich-eintrag-storniert {
  box-shadow: none;
  opacity: 0.65;
}

.fy-bereich-eintrag-storniert .fy-bereich-name {
  text-decoration: line-through;
}

.fy-bereich-aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0;
}

.fy-bereich-aktionen .button,
.fy-suche .button {
  min-height: 44px;
}

.woocommerce-account .fy-button-leise.button {
  background: transparent;
  color: var(--fy-crimson);
  border: 1px solid currentColor;
  box-shadow: none;
}

.fy-bereich-leer {
  margin: 0 0 var(--fy-space-2);
  color: var(--fy-slate);
}

/* --- Station ---------------------------------------------------------- */
.fy-station {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--fy-space-2);
  text-align: center;
}

.fy-station-hinweis {
  max-width: 34ch;
  hyphens: none;
  margin: 0;
  font-size: 1.15rem;
  line-height: 1.5;
}

.fy-station-code {
  width: min(78vw, 420px);
  aspect-ratio: 1;
  padding: 0.75rem;
  background: var(--fy-qr-grund);
  border-radius: var(--fy-r-md);
  box-shadow: var(--fy-shadow-card);
}

.fy-station-code svg {
  display: block;
  width: 100%;
  height: 100%;
}

.fy-station-code svg rect[fill="#ffffff"],
.fy-station-code svg rect[fill="white"] {
  fill: var(--fy-qr-grund);
}

.fy-station-code svg path {
  fill: var(--fy-qr-punkt);
}

.fy-station-meta {
  margin: 0;
  font-size: var(--fy-t-small);
  color: var(--fy-slate);
}

.fy-station-gestoert .fy-station-code {
  opacity: 0.35;
}

.fy-station-titel {
  margin-top: var(--fy-space-3);
}

.fy-station-liste {
  width: 100%;
  max-width: 34rem;
  text-align: left;
}

.fy-station-liste li {
  display: flex;
  flex-direction: column;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--fy-line-paper);
}

/* --- Check-in des Kunden --------------------------------------------- */
.fy-checkin-wahl {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--fy-space-2);
}

.fy-checkin-knopf.button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.25rem;
  min-height: 88px;
  padding: 1rem 1.25rem;
  text-align: left;
}

.fy-checkin-knopf span {
  font-size: 1.1rem;
}

.fy-checkin-knopf small {
  font-family: var(--fy-font-body), sans-serif;
  font-size: 0.9375rem;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.fy-checkin-fertig {
  padding: var(--fy-space-3);
  background: var(--fy-ok-grund);
  border: 1px solid var(--fy-ok);
  border-left-width: 4px;
  border-radius: var(--fy-r-md);
}

.fy-checkin-fertig .fy-karte-label {
  color: var(--fy-ok);
}

/* Das Haekchen zeigt den Erfolg nicht nur ueber die Farbe. */
.fy-checkin-fertig .fy-karte-label::before {
  content: "\2713\00a0";
}

/* --- Terminbuchung: Uhrzeiten als Knoepfe ---------------------------- */
.fy-termin-zeiten {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(88px, 1fr));
  gap: 0.5rem;
  margin: 0;
}

.fy-termin-zeiten .fy-termin-zeit.button {
  min-height: 48px;
  padding: 0.5rem;
  font-variant-numeric: tabular-nums;
}

.fy-checkin-fertig p {
  margin: 0.5rem 0 0;
}

@media (max-width: 479px) {
  .fy-bereich-aktionen,
  .fy-bereich-aktionen .button {
    width: 100%;
  }

  .fy-suche .button {
    width: 100%;
  }
}

/* --- Angemeldet auf dem Handy: Seitenkopf knapp -------------------------
 * Der Seitenkopf ist fuer Inhaltsseiten gedacht und setzt oben viel Luft.
 * Im Konto will man sofort ans Menue und an die Termine, deshalb schrumpfen
 * Abstand und Ueberschrift, und die helle Sektion darunter rueckt nach. */
@media (max-width: 767px) {
  body.woocommerce-account.logged-in .fy-pagehead {
    padding-top: var(--fy-space-3);
    padding-bottom: var(--fy-space-3);
  }

  body.woocommerce-account.logged-in .fy-pagehead .fy-h1 {
    font-size: var(--fy-t-h2);
  }

  body.woocommerce-account.logged-in .fy-pagehead + .fy-section {
    padding-top: var(--fy-space-4);
  }
}
