/*
 * Hörmeisterei Weist: Gestaltung des Amparex-Onlineterminplaners
 * Amparex lädt diese Datei über die Einstellung im Onlineterminplaner.
 * Farben, Rundungen und Größen wie auf der Website (Stand 25.11.2026: weich, Knöpfe als Pillen).
 */

@font-face {
  font-family: "Source Sans 3 Lokal";
  src: url("https://hoermeisterei-weist.de/wp-content/uploads/breakdance/fonts/source_sans_3_lokal_400_600.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --hw-aktion: #388622;
  --hw-aktion-hover: #2f7a1c;
  --hw-aktion-gedrueckt: #1e5012;
  --hw-gruen: #46a72a;
  --hw-text: #56585a;
  --hw-anthrazit: #707173;
  --hw-dunkel: #1d1f20;
  --hw-ruhe: #eef1ea;
  --hw-schrift: "Source Sans 3 Lokal", "Source Sans 3", "Source Sans Pro", Arial, sans-serif;
}

html,
body {
  background: #ffffff;
  color: var(--hw-text);
  font-family: var(--hw-schrift);
  font-size: 18px;
  line-height: 1.5;
}

/* Planer über die volle Breite statt einer halben Bootstrap-Spalte */
body .container {
  width: 100%;
  max-width: 1040px;
  padding: 4px;
}

body .col-md-6 {
  width: 100%;
  float: none;
  padding-left: 0;
  padding-right: 0;
}

/* Kopfzeile: Wochen blättern und Terminart, als weiche hellgrüne Leiste */
body .navbar.navigation-clean {
  min-height: 0;
  margin-bottom: 20px;
  padding: 10px 14px;
  border: none;
  border-radius: 24px;
  background: var(--hw-ruhe);
  box-shadow: none;
}

body .navigation-clean .navbar-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  float: none;
}

body .navigation-clean .navbar-nav > li {
  float: none;
  padding: 0;
}

/* Die Auswahl der Terminart rückt nach rechts */
body .navigation-clean .navbar-nav > li:last-child {
  margin-left: auto;
}

/* Pfeile: runde weiße Knöpfe mit grünem Pfeil */
body .navigation-clean .navbar-brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  padding: 0;
  float: none;
  border-radius: 50%;
  background: #ffffff;
  color: var(--hw-aktion);
  font-size: 30px;
  line-height: 1;
  transition: background-color 180ms ease-out, color 180ms ease-out, transform 180ms ease-out;
}

body .navigation-clean .navbar-brand:hover,
body .navigation-clean .navbar-brand:focus {
  background: var(--hw-aktion);
  color: #ffffff;
}

body .navigation-clean .navbar-brand i {
  color: inherit;
}

body .navigation-clean .navbar-brand:active {
  transform: scale(0.97);
}

/* Mitte: statt des internen Namens der Ressource steht „Diese Woche“ (führt zur laufenden Woche) */
body .navigation-clean .navbar-brand.navbar-link,
body .navigation-clean .navbar-brand.navbar-link:hover,
body .navigation-clean .navbar-brand.navbar-link:focus {
  width: auto;
  height: 52px;
  padding: 0 20px;
  border-radius: 999px;
  background: transparent;
  color: var(--hw-text);
  font-size: 0;
}

body .navigation-clean .navbar-brand.navbar-link::after {
  content: "Diese Woche";
  font-size: 20px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

body .navigation-clean .navbar-brand.navbar-link:hover::after {
  text-decoration-thickness: 2px;
}

body #ax-template-selection {
  min-height: 52px;
  max-width: 100%;
  padding: 8px 18px;
  border: 2px solid var(--hw-gruen);
  border-radius: 999px;
  background-color: #ffffff;
  box-shadow: none;
  color: var(--hw-text);
  font-family: var(--hw-schrift);
  font-size: 18px;
  font-weight: 600;
  text-shadow: none;
}

/* Tabelle */
body .table.ax-timeplanner {
  width: 100%;
  margin-bottom: 20px;
  border-collapse: separate;
  border-spacing: 8px 6px;
  table-layout: fixed;
}

body .table.ax-timeplanner > thead > tr > td,
body .table.ax-timeplanner > tbody > tr > td,
body .table.ax-timeplanner > thead > tr > th,
body .table.ax-timeplanner > tbody > tr > th {
  padding: 0;
  border: none;
  text-align: center;
  vertical-align: middle;
}

body .table.ax-timeplanner > thead > tr > td.ax-tp-header,
body .table.ax-timeplanner > tbody > tr > td.ax-tp-header,
body .ax-timeplanner .ax-tp-header {
  padding: 4px 2px 10px;
  border-bottom: 2px solid var(--hw-gruen);
  color: var(--hw-text);
  font-size: 17px;
  font-weight: 600;
  line-height: 1.25;
}

/* Freier Termin: grüne Pille wie die Knöpfe der Website */
body .ax-timeplanner td a {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 6px 2px;
  border-radius: 999px;
  background: var(--hw-aktion);
  color: #ffffff;
  font-size: 18px;
  font-weight: 600;
  text-decoration: none;
  transition: background-color 180ms ease-out, transform 180ms ease-out;
}

body .ax-timeplanner td a:hover,
body .ax-timeplanner td a:focus {
  background: var(--hw-aktion-hover);
  color: #ffffff;
  text-decoration: none;
}

body .ax-timeplanner td a:active {
  background: var(--hw-aktion-gedrueckt);
  transform: scale(0.97);
}

/* Belegt: kleiner heller Punkt statt Kreuz */
body .ax-timeplanner .fa-times {
  display: block;
  width: 8px;
  height: 8px;
  margin: 19px auto;
  border-radius: 50%;
  background: #d5dccd;
  font-size: 0;
}

body .ax-timeplanner .fa-times::before {
  content: none;
}

/* Fokus überall deutlich */
body a:focus-visible,
body button:focus-visible,
body select:focus-visible,
body input:focus-visible,
body textarea:focus-visible {
  outline: 3px solid var(--hw-anthrazit);
  outline-offset: 2px;
}

/* Rechtliche Links */
body .ax-legal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  padding: 0 4px;
  font-size: 16px;
}

body .ax-legal-footer a {
  color: var(--hw-text);
  font-family: var(--hw-schrift);
  font-size: 16px;
  text-decoration: underline;
}

/* Formular im Fenster nach der Terminauswahl */
body .modal-content {
  border: none;
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(56, 134, 34, 0.18);
  color: var(--hw-text);
  font-family: var(--hw-schrift);
  overflow: hidden;
}

body .modal-header {
  padding: 20px 24px 12px;
  border-bottom: none;
}

body .modal-body {
  padding: 8px 24px 16px;
}

body .modal-title {
  color: var(--hw-aktion);
  font-family: var(--hw-schrift);
  font-size: 22px;
  font-weight: 600;
}

body .modal-header .close {
  font-size: 34px;
  opacity: 0.8;
}

body .modal-body label,
body .modal-body .form-label {
  color: var(--hw-text);
  font-size: 18px;
  font-weight: 600;
}

body .modal-body .form-control {
  height: auto;
  min-height: 50px;
  padding: 10px 16px;
  border: 2px solid var(--hw-anthrazit);
  border-radius: 16px;
  box-shadow: none;
  color: var(--hw-text);
  font-size: 18px;
}

body .modal-body .form-control:focus {
  border-color: var(--hw-aktion);
  box-shadow: none;
}

body .modal-footer {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  padding: 12px 24px 24px;
  border-top: none;
  text-align: left;
}

body .modal-footer .btn {
  min-height: 52px;
  margin: 0;
  padding: 12px 28px;
  border: 2px solid var(--hw-gruen);
  border-radius: 999px;
  background: #ffffff;
  color: var(--hw-text);
  font-size: 18px;
  font-weight: 600;
  transition: background-color 180ms ease-out, transform 180ms ease-out;
}

body .modal-footer .btn:hover {
  background: var(--hw-ruhe);
}

body .modal-footer .btn:active {
  transform: scale(0.97);
}

body .modal-footer .btn:first-child,
body .modal-footer .btn[type="submit"],
body .modal-footer .btn.btn-primary {
  border-color: transparent;
  background: var(--hw-aktion);
  color: #ffffff;
}

body .modal-footer .btn:first-child:hover,
body .modal-footer .btn[type="submit"]:hover,
body .modal-footer .btn.btn-primary:hover {
  background: var(--hw-aktion-hover);
}

body .ax-branch-description {
  font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
  body .navigation-clean .navbar-brand,
  body .ax-timeplanner td a,
  body .modal-footer .btn {
    transition: none;
  }

  body .navigation-clean .navbar-brand:active,
  body .ax-timeplanner td a:active,
  body .modal-footer .btn:active {
    transform: none;
  }
}

/* Ab 601 px: Der ganze Kalender passt in die Höhe des Fensters bzw. des Rahmens auf der Website, ohne Scrollen.
   Die Zeilenhöhe ergibt sich aus der verfügbaren Höhe (18 Zeilen), höchstens 46 px, mindestens 24 px. */
@media (min-width: 601px) {
  :root {
    --hw-zeile: clamp(24px, calc((100vh - 160px) / 18 - 4px), 46px);
  }

  html,
  body {
    margin: 0;
  }

  body .container {
    padding: 2px 4px 0;
  }

  body .navbar.navigation-clean {
    margin-bottom: 8px;
    padding: 6px 10px;
  }

  body .navigation-clean .navbar-brand {
    width: 44px;
    height: 44px;
    font-size: 26px;
  }

  body .navigation-clean .navbar-brand.navbar-link,
  body .navigation-clean .navbar-brand.navbar-link:hover,
  body .navigation-clean .navbar-brand.navbar-link:focus {
    height: 44px;
  }

  body #ax-template-selection {
    min-height: 44px;
    padding: 4px 16px;
  }

  body .table.ax-timeplanner {
    margin-bottom: 6px;
    border-spacing: 8px 4px;
  }

  body .table.ax-timeplanner > thead > tr > td.ax-tp-header,
  body .table.ax-timeplanner > tbody > tr > td.ax-tp-header,
  body .ax-timeplanner .ax-tp-header {
    padding: 2px 2px 5px;
    font-size: 16px;
  }

  body .ax-timeplanner td a {
    min-height: 0;
    height: var(--hw-zeile);
    padding: 0 2px;
    font-size: clamp(16px, calc(var(--hw-zeile) * 0.52), 18px);
    line-height: 1;
  }

  body .ax-timeplanner .fa-times {
    margin: calc((var(--hw-zeile) - 8px) / 2) auto;
  }

  body .ax-legal-footer {
    gap: 4px 20px;
  }

  body .ax-legal-footer a {
    font-size: 15px;
    line-height: 1.3;
  }
}

/* Schmale Bildschirme: sieben Tagesspalten müssen in 350 px passen */
@media (max-width: 600px) {
  html,
  body {
    font-size: 16px;
  }

  body .navbar.navigation-clean {
    border-radius: 20px;
  }

  body .navigation-clean .navbar-nav > li:last-child {
    width: 100%;
    margin-left: 0;
  }

  body #ax-template-selection {
    width: 100%;
  }

  body .table.ax-timeplanner {
    border-spacing: 3px 4px;
  }

  body .ax-timeplanner .ax-tp-header {
    font-size: 13px;
    word-break: break-word;
  }

  body .ax-timeplanner td a {
    min-height: 40px;
    padding: 4px 0;
    font-size: 14px;
    letter-spacing: -0.02em;
  }

  body .ax-timeplanner .fa-times {
    width: 6px;
    height: 6px;
    margin: 17px auto;
  }

  body .modal-body .col-xs-4,
  body .modal-header .col-xs-4 {
    display: none;
  }

  body .modal-body .col-xs-8,
  body .modal-header .col-xs-8 {
    width: 100%;
  }
}
