/*
 * Styles following the LunaLab corporate design (lunalab.de).
 * Self-hosted only: no external fonts or CDNs (CSP allows 'self' only).
 * Font: Source Sans Pro (SIL Open Font License, see fonts/README.md).
 */
@font-face {
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/source-sans-pro-regular.0ad032b3d07a.woff2") format("woff2");
}

@font-face {
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 600 700;  /* lunalab.de ships 700 only; semibold text uses it too */
  font-display: swap;
  src: url("fonts/source-sans-pro-700.4610010f425c.woff2") format("woff2");
}

:root {
  --navy: #313743;        /* headings, primary buttons */
  --navy-dark: #2b3441;   /* logo text */
  --text: #3f4a59;        /* body text */
  --muted: #4f5a69;       /* secondary text */
  --teal: #6fb2c5;        /* logo colour – decorative only (too light for text) */
  --teal-text: #46849a;   /* teal dark enough for text on white (WCAG AA) */
  --teal-light: #eaf7fc;  /* light surfaces */
  --teal-soft: #d1e7eb;   /* footer */
  --border: #dfe5e9;
  --error: #b00020;
  --radius: 12px;
  --pill: 999px;

  font-family: "Source Sans Pro", "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.55;
  color: var(--text);
  background: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a {
  color: var(--navy);
}

a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 3px solid var(--teal);
  outline-offset: 2px;
}

/* --- Header --- */

.site-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  max-width: 44rem;
  width: 100%;
  margin: 0 auto;
  padding: 1rem 1.25rem;
}

.brand {
  display: block;
  line-height: 0;
}

.brand img {
  width: 150px;
  height: auto;
}

.language {
  display: flex;
  gap: 0.25rem;
}

.language button[type="submit"] {
  min-width: 2.6rem;
  padding: 0.3rem 0.7rem;
  border: 1.5px solid var(--border);
  border-radius: var(--pill);
  background: #fff;
  color: var(--muted);
  font: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
}

.language button[type="submit"][aria-current="true"] {
  border-color: var(--navy);
  color: var(--navy);
}

/* --- Main --- */

main {
  flex: 1;
  max-width: 44rem;
  width: 100%;
  margin: 0 auto;
  padding: 0.5rem 1.25rem 3rem;
}

.kicker {
  margin: 1.5rem 0 0.25rem;
  font-size: 0.85rem;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: var(--teal-text);
}

h1 {
  margin: 0.25rem 0 1rem;
  font-size: clamp(1.9rem, 6vw, 2.6rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.5px;
  text-transform: uppercase;
  color: var(--navy);
}

h2 {
  font-weight: 600;
  color: var(--navy);
}

/* --- Buttons (pill-shaped as on lunalab.de) --- */

a.button,
button[type="submit"] {
  display: inline-block;
  padding: 0.8rem 1.5rem;
  border: 1.5px solid var(--navy);
  border-radius: var(--pill);
  background: var(--navy);
  color: #fff;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, color 0.15s;
}

a.button:hover,
button[type="submit"]:hover {
  background: var(--navy-dark);
}

a.button.secondary {
  background: transparent;
  color: var(--navy);
}

a.button.secondary:hover {
  background: var(--teal-light);
}

/* --- Doctor selection --- */

.choices {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
}

.choices li {
  margin: 0.6rem 0;
}

.choices a {
  display: block;
  padding: 1rem 1.25rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-weight: 600;
  text-decoration: none;
  color: var(--navy);
  transition: border-color 0.15s, background-color 0.15s;
}

.choices li:first-child a {
  background: var(--teal-light);
  border-color: var(--teal-soft);
}

/* --- Slot list --- */

.day {
  margin: 1.5rem 0;
}

.day h2 {
  margin: 0 0 0.6rem;
  padding-bottom: 0.3rem;
  border-bottom: 1.5px solid var(--border);
  font-size: 1.05rem;
}

.slots {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.slots a {
  display: block;
  min-width: 4.5rem;
  padding: 0.55rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: var(--pill);
  font-weight: 600;
  text-align: center;
  text-decoration: none;
  color: var(--navy);
  transition: border-color 0.15s, background-color 0.15s;
}

.slots a:hover,
.slots a:focus,
.choices a:hover,
.choices a:focus {
  border-color: var(--navy);
  background: var(--teal-light);
}

/* --- Summary box (selected slot, confirmed slot) --- */

.summary {
  padding: 1rem 1.25rem;
  border-left: 4px solid var(--teal);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--teal-light);
  font-weight: 600;
  color: var(--navy);
}

.summary a {
  font-weight: 400;
}

/* --- Forms --- */

form label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
  color: var(--navy);
}

form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="date"] {
  width: 100%;
  max-width: 26rem;
  padding: 0.7rem 0.9rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #fff;
  color: var(--text);
  font: inherit;
}

form input:focus {
  border-color: var(--teal);
}

fieldset {
  border: 0;
  padding: 0;
  margin: 0 0 1rem;
}

legend {
  margin-bottom: 0.4rem;
  font-weight: 600;
  color: var(--navy);
}

fieldset > div {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

fieldset label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.5rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--pill);
  font-weight: 400;
  color: var(--text);
  cursor: pointer;
}

fieldset input[type="radio"] {
  accent-color: var(--navy);
}

fieldset label:has(input:checked) {
  border-color: var(--navy);
  background: var(--teal-light);
}

/* Required fields: red asterisk after the label (see BookingForm.required_css_class) */
label.required::after,
legend.required::after {
  content: " *";
  color: var(--error);
}

.errorlist {
  margin: 0.3rem 0 0;
  padding: 0;
  list-style: none;
}

.errorlist,
.error {
  color: var(--error);
}

.hint {
  font-size: 0.92rem;
  color: var(--muted);
}

/* Honeypot: invisible to humans */
.hp {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- Footer --- */

.site-footer {
  background: var(--teal-soft);
  color: var(--navy);
  font-size: 0.9rem;
}

.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  max-width: 44rem;
  margin: 0 auto;
  padding: 1.25rem;
}

.language button[type="submit"]:hover {
  border-color: var(--navy);
  background: var(--teal-light);
}
