/* Terminanfrage: Knopf in der Kopfzeile + Formular-Fenster */
@font-face { font-family: "Jost"; src: url("jost-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Jost"; src: url("jost-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

.anfrage-btn {
  margin-left: auto;
  padding: 12px 24px;
  border: 0;
  border-radius: 999px;
  background: #f0e4db;
  color: #3a2c23;
  font: 500 14px/1 "Cinzel", "Times New Roman", serif;
  letter-spacing: .08em;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(60, 40, 25, .18);
  transition: background .2s, transform .2s;
  white-space: nowrap;
}
.anfrage-btn:hover { background: #fff8f2; transform: translateY(-1px); }
.anfrage-btn:focus-visible { outline: 2px solid #f0e4db; outline-offset: 3px; }
/* Variante auf hellem Grund (Preisseite): dunkel, feine helle Innenlinie, Pfeil */
.anfrage-btn--dark {
  display: inline-flex; align-items: center; gap: 14px;
  margin: 0;
  padding: 20px 40px 20px 46px;
  background: #a8968a;
  color: #fff;
  text-shadow: 0 1px 2px rgba(60, 40, 25, .25);
  font-size: 15px;
  letter-spacing: .18em;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 10px 26px rgba(120, 95, 80, .25);
  transition: box-shadow .3s ease, transform .3s ease, background .3s ease;
}
.anfrage-btn--dark::after {
  content: "";
  width: 22px; height: 10px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 10'%3E%3Cpath d='M0 5h20M16 1l4 4-4 4' fill='none' stroke='%23ffffff' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
  transition: transform .3s ease;
}
.anfrage-btn--dark:hover {
  background: #9c8a7e;
  transform: translateY(-2px);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 16px 34px rgba(120, 95, 80, .32);
}
.anfrage-btn--dark:hover::after { transform: translateX(4px); }
.anfrage-btn--dark:focus-visible { outline: 2px solid #a8968a; outline-offset: 4px; }

/* Schmale Bildschirme: Knopf zwischen Logo und Menue */
@media (max-width: 720px) {
  /* Kopfzeilen-Knopf in eigener Zeile unter den Reitern, mittig */
  .header > .anfrage-btn { flex: none; margin: 2px 0 0; padding: 10px 20px; font-size: clamp(11px, 3.2vw, 13px); letter-spacing: .06em; }
  .anfrage-btn--dark { margin: 0; padding: 17px 30px 17px 34px; font-size: 14px; letter-spacing: .14em; }
}

/* ---------- Fenster ---------- */
.af {
  --ink: #3a2c23; --muted: #8a7466; --line: #e6d8cd; --taupe: #a8968a; --beige: #f0e4db; --paper: #f8f2ed;
  width: min(620px, calc(100vw - 24px));
  max-height: min(92vh, 980px);
  margin: auto;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: var(--paper);
  color: var(--ink);
  font: 400 16px/1.55 "Jost", system-ui, sans-serif;
  box-shadow: 0 40px 100px rgba(40, 25, 15, .4);
  overflow-y: auto;
  overscroll-behavior: contain;
}
.af[open] { animation: af-in .45s cubic-bezier(.2, .7, .2, 1); }
.af::backdrop { background: rgba(45, 32, 24, .5); backdrop-filter: blur(6px); }
.af[open]::backdrop { animation: af-fade .45s ease; }
@keyframes af-in { from { opacity: 0; transform: translateY(18px) scale(.985); } }
@keyframes af-fade { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .af[open], .af[open]::backdrop { animation: none; } }

/* Kopf im Taupe mit grossem, unten angeschnittenem MADEA */
.af__head {
  position: relative;
  overflow: hidden;
  padding: 44px 0 max(calc(11cqw + 6px), 68px);
  background: var(--taupe);
  color: var(--beige);
  text-align: center;
  container-type: inline-size;
}
.af__head::before {
  content: "MADEA";
  position: absolute; left: 0; right: 0; bottom: 0;
  font: 500 24.5cqw/1 "Cinzel", serif;
  text-align: center;
  white-space: nowrap;
  color: rgba(240, 228, 219, .2);
  transform: translateY(0.42em); /* wie auf der Startseite: unten abgeschnitten */
  pointer-events: none;
}
.af__head > * { position: relative; }
.af__close { position: absolute !important; }
.af__eyebrow { font-size: 12px; letter-spacing: .32em; text-transform: uppercase; opacity: .85; }
.af__head h2 { margin: 8px 0 12px; font: 500 clamp(28px, 5vw, 38px)/1.1 "Cinzel", serif; letter-spacing: .04em; }
.af__intro { max-width: 380px; padding: 0 20px; margin: 0 auto; font-size: 15px; opacity: .92; }
.af__close {
  position: absolute; top: 14px; right: 14px; z-index: 1;
  width: 42px; height: 42px; border: 0; border-radius: 50%;
  background: transparent; cursor: pointer;
}
.af__close::before, .af__close::after {
  content: ""; position: absolute; left: 12px; right: 12px; top: 50%; height: 1.5px; background: var(--beige);
  transform: rotate(45deg); transition: transform .3s ease;
}
.af__close::after { transform: rotate(-45deg); }
.af__close:hover { background: rgba(255, 255, 255, .12); }
.af__close:focus-visible { outline: 2px solid var(--beige); outline-offset: 2px; }

.af__body { padding: 8px clamp(24px, 6vw, 52px) 34px; }
.af__step { padding: 30px 0 6px; border-bottom: 1px solid var(--line); }
.af__step h3 {
  display: flex; align-items: baseline; gap: 14px; margin-bottom: 18px;
  font: 500 19px/1.2 "Cinzel", serif; letter-spacing: .04em;
}
.af__step h3 span { font: 400 13px/1 "Jost", sans-serif; letter-spacing: .12em; color: var(--muted); }
.af__step h3 em { margin-left: auto; font: italic 400 13px/1 "Jost", sans-serif; color: var(--muted); letter-spacing: 0; }

/* Felder: nur Unterstrich, Beschriftung schwebt nach oben */
.af__row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
.af__field { position: relative; margin-bottom: 22px; min-width: 0; }
.af__field input {
  width: 100%;
  padding: 22px 0 8px;
  border: 0;
  border-bottom: 1px solid #cdbbae;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  outline: none;
  transition: border-color .25s;
}
.af__field label {
  position: absolute; left: 0; top: 22px;
  color: var(--muted); font-size: 16px;
  pointer-events: none;
  transform-origin: left top;
  transition: transform .25s ease, color .25s ease;
}
.af__field input:focus + label,
.af__field input:not(:placeholder-shown) + label,
.af__field--fixed label { transform: translateY(-20px) scale(.78); letter-spacing: .06em; }
.af__field input:focus { border-bottom-color: var(--ink); }
.af__field input:focus + label { color: var(--ink); }
.af__field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink);
  transform: scaleX(0); transform-origin: left; transition: transform .35s ease;
}
.af__field:focus-within::after { transform: scaleX(1); }
.af__field input::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }

/* Behandlungen */
.af__searchwrap { position: relative; margin-bottom: 14px; }
.af__search {
  width: 100%; padding: 12px 16px 12px 42px;
  border: 1px solid var(--line); border-radius: 999px; background: #fff;
  color: var(--ink); font: inherit; font-size: 15px; outline: none;
}
.af__search:focus { border-color: var(--taupe); }
.af__searchwrap::before {
  content: ""; position: absolute; left: 16px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%);
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='7' cy='7' r='5.2' fill='none' stroke='%238a7466' stroke-width='1.3'/%3E%3Cpath d='M11 11l3.6 3.6' stroke='%238a7466' stroke-width='1.3'/%3E%3C/svg%3E") center / contain no-repeat;
}
.af__chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.af__chips:empty { display: none; }
.af-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px 7px 14px; border: 1px solid var(--taupe); border-radius: 999px;
  background: var(--beige); color: var(--ink); font: 400 14px/1.3 "Jost", sans-serif; cursor: pointer; text-align: left;
  transition: background .2s;
}
.af-chip:hover { background: #e7d8cc; }
.af-chip span { font-size: 16px; line-height: 1; color: var(--muted); }
.af__list { max-height: 300px; overflow-y: auto; border-top: 1px solid var(--line); }
.af-cat { border-bottom: 1px solid var(--line); }
.af-cat summary {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 2px; cursor: pointer; list-style: none;
  font: 500 14px/1.3 "Jost", sans-serif; letter-spacing: .1em; text-transform: uppercase;
}
.af-cat summary::-webkit-details-marker { display: none; }
.af-cat summary::after {
  content: ""; margin-left: auto; width: 9px; height: 9px;
  border-right: 1.3px solid var(--muted); border-bottom: 1.3px solid var(--muted);
  transform: translateY(-3px) rotate(45deg); transition: transform .25s ease;
}
.af-cat[open] summary::after { transform: translateY(2px) rotate(-135deg); }
.af-count {
  min-width: 22px; padding: 2px 7px; border-radius: 999px;
  background: var(--ink); color: var(--paper); font-size: 12px; letter-spacing: 0; text-align: center;
}
.af-cat ul { list-style: none; padding: 0 0 12px; }
.af-cat li { position: relative; }
.af-cat input[type="checkbox"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.af-cat label {
  display: flex; align-items: center; gap: 14px;
  padding: 9px 10px; border-radius: 6px; cursor: pointer; font-size: 15px;
  transition: background .2s;
}
.af-cat label:hover { background: #f1e7df; }
.af-cat label::before {
  content: ""; flex: none; width: 18px; height: 18px; border: 1px solid #b9a597; border-radius: 50%;
  background: #fff center / 10px no-repeat; transition: background-color .2s, border-color .2s;
}
.af-cat input:checked + label::before {
  border-color: var(--ink); background-color: var(--ink);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 8'%3E%3Cpath d='M1 4l2.6 2.6L9 1' fill='none' stroke='%23f8f2ed' stroke-width='1.5'/%3E%3C/svg%3E");
}
.af-cat input:focus-visible + label { outline: 2px solid var(--taupe); outline-offset: 1px; }
.af-cat label > span:first-child { flex: 1; }
.af-meta { display: flex; align-items: baseline; gap: 14px; white-space: nowrap; }
.af-dur { color: var(--muted); font-size: 13px; }
.af-price { color: var(--ink); white-space: nowrap; font-family: "Cinzel", serif; font-size: 14px; min-width: 52px; text-align: right; }
.af__error { color: #9b2f22; font-size: 14px; margin: 10px 0 4px; }
.af__behandlungen { padding-bottom: 22px; }

/* Uhrzeit: Auswahlliste im gleichen Stil wie das Datumsfeld */
.af__field select {
  width: 100%;
  padding: 22px 28px 10px 0;
  height: auto;
  line-height: inherit;
  border: 0;
  border-bottom: 1px solid #cdbbae;
  border-radius: 0;
  background: transparent url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Ccircle cx='8' cy='8' r='6.3' fill='none' stroke='%233a2c23' stroke-width='1.3'/%3E%3Cpath d='M8 4.4V8l2.4 1.6' fill='none' stroke='%233a2c23' stroke-width='1.3'/%3E%3C/svg%3E") right 2px bottom 13px / 15px no-repeat;
  color: var(--ink);
  font: inherit;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  opacity: 1;
}
.af__field select:invalid { color: #8a7466; }
.af__field select:focus { border-bottom-color: var(--ink); }
.af__field select option { color: var(--ink); }
.af__field input::-webkit-calendar-picker-indicator { opacity: .85; }

/* Absenden: wie der Knopf auf der Preisseite */
.af__submit {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  width: 100%; margin-top: 30px; padding: 20px 24px; border: 0; border-radius: 999px;
  background: #a8968a; text-shadow: 0 1px 2px rgba(60, 40, 25, .25);
  color: #fff; font: 500 15px/1 "Cinzel", serif; letter-spacing: .16em; cursor: pointer;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28), 0 10px 26px rgba(120, 95, 80, .25);
  transition: transform .3s ease, box-shadow .3s ease, background .3s ease;
}
.af__submit::after {
  content: ""; width: 22px; height: 10px; transition: transform .3s ease;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 22 10'%3E%3Cpath d='M0 5h20M16 1l4 4-4 4' fill='none' stroke='%23ffffff' stroke-width='1.2'/%3E%3C/svg%3E") center / contain no-repeat;
}
.af__submit:hover { background: #9c8a7e; transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .4), 0 16px 34px rgba(120, 95, 80, .32); }
.af__submit:hover::after { transform: translateX(4px); }
.af__submit:focus-visible { outline: 2px solid var(--taupe); outline-offset: 4px; }
.af__note { margin-top: 14px; text-align: center; color: var(--muted); font-size: 13px; }

@media (max-width: 520px) {
  .af { width: 100vw; max-width: 100vw; max-height: 100dvh; height: 100dvh; border-radius: 0; }
  .af__row { grid-template-columns: 1fr; }
  .af__list { max-height: none; }
  .af-meta { flex-direction: column; align-items: flex-end; gap: 2px; }
}

/* Ausgeblendete Elemente (Suche, Zaehler) wirklich verstecken */
.af [hidden] { display: none !important; }

/* Nachrichtenfeld (Persoenliche Nachricht) im gleichen Stil wie die anderen Felder */
.af__field textarea {
  width: 100%;
  min-height: 150px;
  padding: 26px 0 10px;
  border: 0;
  border-bottom: 1px solid #cdbbae;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  resize: vertical;
  outline: none;
}
.af__field textarea:focus { border-bottom-color: var(--ink); }
.af__field textarea:focus + label,
.af__field textarea:not(:placeholder-shown) + label { transform: translateY(-20px) scale(.78); letter-spacing: .06em; }
.af__field textarea:focus + label { color: var(--ink); }
.af__field--text label { top: 26px; }
