/* ONEART · Kostenloses Erstgespräch buchen – baut auf den Farben und Schriften der Website auf (styles.css). */
.termin-hero {
  padding-block: clamp(3.5rem, 7vw, 6rem) clamp(2.5rem, 5vw, 4rem);
}

.termin-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(200px, 300px);
  align-items: end;
  gap: clamp(2rem, 6vw, 6rem);
}

.termin-hero h1 {
  max-width: 15ch;
}

.termin-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1.8rem 0 0;
  padding: 0;
  list-style: none;
}

.termin-facts li {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line-dark);
  color: #e8dfd5;
  font-size: 0.84rem;
  font-weight: 700;
}

.termin-facts svg,
.termin-scroll svg,
.termin-submit svg {
  width: 17px;
  height: 17px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.termin-facts svg {
  color: var(--signal);
}

.termin-person {
  margin: 0;
}

.termin-person img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  object-position: 50% 20%;
}

.termin-person figcaption {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  margin-top: 0.85rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.4;
}

.termin-person strong {
  color: var(--paper);
  font-size: 0.95rem;
}

/* Buchungsbereich */
.termin-section {
  padding-block: clamp(2.5rem, 6vw, 5rem);
  background: var(--paper);
  color: var(--ink);
  scroll-margin-top: 5rem;
}

.termin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(250px, 330px);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
}

.termin-card {
  position: relative;
  min-width: 0;
  padding: clamp(1.25rem, 3.5vw, 2.5rem);
  border: 1px solid var(--line-light);
  background: #fff;
  box-shadow: 0 34px 70px -48px rgba(17, 16, 15, 0.45);
}

.termin-step + .termin-step {
  margin-top: 1.9rem;
  padding-top: 1.9rem;
  border-top: 1px solid var(--line-light);
}

.termin-step__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.termin-step__head h2 {
  max-width: none;
  margin: 0;
  font-size: clamp(1.25rem, 2.2vw, 1.6rem);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.termin-step__num {
  width: 2rem;
  height: 2rem;
  display: grid;
  flex: none;
  place-items: center;
  border-radius: 50%;
  background: var(--ink);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 800;
  transition: background 180ms ease;
}

.termin-step.is-done .termin-step__num {
  background: var(--signal);
}

.termin-step__hint {
  margin-left: auto;
  color: #6d675f;
  font-size: 0.86rem;
  font-weight: 700;
}

/* Tage */
.termin-days-wrap {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.termin-days {
  display: flex;
  flex: 1;
  gap: 0.55rem;
  min-width: 0;
  padding: 0.2rem 0.1rem 0.5rem;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x proximity;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}

.termin-days::-webkit-scrollbar {
  display: none;
}

.termin-day {
  display: flex;
  flex: 0 0 auto;
  flex-direction: column;
  align-items: center;
  gap: 0.12rem;
  width: 5.4rem;
  padding: 0.75rem 0.35rem 0.65rem;
  border: 1px solid var(--line-light);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  scroll-snap-align: start;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease, transform 160ms ease;
}

.termin-day small {
  color: #6d675f;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.termin-day strong {
  font-size: 1.65rem;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
}

.termin-day span {
  color: #6d675f;
  font-size: 0.78rem;
  font-weight: 600;
}

.termin-day em {
  margin-top: 0.35rem;
  color: #287a45;
  font-size: 0.68rem;
  font-style: normal;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.termin-day:hover:not(:disabled) {
  border-color: var(--ink);
  transform: translateY(-2px);
}

.termin-day[aria-checked="true"] {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.termin-day[aria-checked="true"] small,
.termin-day[aria-checked="true"] span {
  color: #cfc8bd;
}

.termin-day[aria-checked="true"] em {
  color: #8fdcaa;
}

.termin-day:disabled {
  background: repeating-linear-gradient(135deg, #fff 0 6px, #f4f1ec 6px 12px);
  cursor: not-allowed;
  opacity: 0.6;
}

.termin-day:disabled em {
  color: #6d675f;
}

.termin-scroll {
  width: 2.4rem;
  height: 2.4rem;
  display: grid;
  flex: none;
  place-items: center;
  border: 1px solid var(--line-light);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  transition: border-color 160ms ease, opacity 160ms ease;
}

.termin-scroll:hover {
  border-color: var(--ink);
}

.termin-scroll:disabled {
  opacity: 0.3;
  cursor: default;
}

@media (hover: none) {
  .termin-scroll {
    display: none;
  }
}

/* Uhrzeiten */
.termin-times {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(5.4rem, 1fr));
  gap: 0.55rem;
}

.termin-time {
  min-height: 3rem;
  border: 1px solid var(--line-light);
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 1rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0.02em;
  transition: border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.termin-time:hover {
  border-color: var(--ink);
}

.termin-time[aria-checked="true"] {
  border-color: var(--signal);
  background: var(--signal);
  color: #fff;
}

.termin-empty {
  margin: 0;
  color: #6d675f;
  font-size: 0.92rem;
}

.termin-day:focus-visible,
.termin-time:focus-visible,
.termin-scroll:focus-visible,
.termin-topics button:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

/* Formular */
.termin-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem 1.25rem;
}

.termin-fields .field input {
  min-height: 3.1rem;
  font-size: 1rem;
}

.termin-fields .field.has-error input {
  border-bottom-color: #a40d1f;
}

.termin-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0.45rem 0 0.2rem;
}

.termin-topics button {
  padding: 0.42rem 0.68rem;
  border: 1px solid var(--line-light);
  background: var(--paper);
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  font-size: 0.78rem;
  font-weight: 700;
  transition: background 160ms ease, color 160ms ease, border-color 160ms ease;
}

.termin-topics button:hover,
.termin-topics button.is-active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.termin-error {
  margin: 0.3rem 0 0;
  color: #a40d1f;
  font-size: 0.8rem;
  font-weight: 700;
}

.termin-error:empty {
  display: none;
}

.termin-honeypot {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.termin-submit {
  width: 100%;
  min-height: 3.7rem;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 1.6rem;
  padding-inline: 1.25rem;
  font-size: 0.95rem;
  text-align: left;
}

.termin-submit svg {
  width: 20px;
  height: 20px;
}

.termin-submit:disabled {
  cursor: not-allowed;
  opacity: 0.5;
  transform: none;
}

.termin-submit:disabled:hover {
  border-color: var(--ink);
  background: var(--ink);
}

.termin-submit.is-loading {
  cursor: wait;
  opacity: 0.7;
}

.termin-status {
  min-height: 1.2rem;
  margin: 0.8rem 0 0;
  color: #a40d1f;
  font-size: 0.88rem;
  font-weight: 700;
}

.termin-status:empty {
  min-height: 0;
  margin: 0;
}

.termin-status.is-ok {
  color: #287a45;
}

.termin-fineprint {
  margin: 0.7rem 0 0;
  color: #6d675f;
  font-size: 0.8rem;
  line-height: 1.5;
}

.termin-note {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: var(--paper);
  font-size: 0.9rem;
}

/* Erfolg, Verwaltung */
.termin-success:focus {
  outline: none;
}

.termin-check {
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: 1rem;
}

.termin-check svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.termin-check circle {
  stroke: #287a45;
  stroke-dasharray: 151;
  stroke-dashoffset: 151;
  animation: termin-draw 600ms ease-out forwards;
}

.termin-check path {
  stroke: #287a45;
  stroke-dasharray: 40;
  stroke-dashoffset: 40;
  animation: termin-draw 380ms 420ms ease-out forwards;
}

@keyframes termin-draw {
  to {
    stroke-dashoffset: 0;
  }
}

.termin-kicker {
  margin: 0 0 0.45rem;
  color: var(--signal);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.termin-success h2,
.termin-closed h2 {
  max-width: none;
  margin-bottom: 0.4rem;
  font-size: clamp(1.8rem, 3.2vw, 2.5rem);
}

.termin-when {
  max-width: none;
  margin: 0.2rem 0 0.9rem;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.termin-success__text {
  max-width: 52ch;
  margin: 0;
  color: #3a3732;
}

.termin-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.3rem;
}

.termin-next {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line-light);
}

.termin-next p {
  margin: 0 0 0.4rem;
  color: #3a3732;
  font-size: 0.92rem;
}

.termin-textlink {
  color: var(--signal);
  font-weight: 800;
}

.termin-details {
  display: grid;
  gap: 0.55rem;
  margin: 0.4rem 0 0;
}

.termin-details div {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: 1rem;
  padding-bottom: 0.55rem;
  border-bottom: 1px solid var(--line-light);
}

.termin-details dt {
  color: #6d675f;
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.termin-details dd {
  margin: 0;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.termin-link-danger {
  padding: 0.6rem 0.2rem;
  border: 0;
  background: none;
  color: #a40d1f;
  cursor: pointer;
  font: inherit;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.termin-closed p {
  color: #3a3732;
}

/* Seitenleiste */
.termin-aside {
  position: sticky;
  top: 6.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.4rem;
}

.termin-summary {
  padding: 1.35rem 1.4rem;
  background: var(--ink);
  color: var(--paper);
  transition: box-shadow 200ms ease;
}

.termin-summary.is-set {
  box-shadow: inset 4px 0 0 var(--signal);
}

.termin-summary__when {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 800;
  line-height: 1.25;
  letter-spacing: -0.03em;
}

.termin-summary__sub {
  margin: 0.4rem 0 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.termin-howto {
  display: flex;
  flex-direction: column;
  gap: 0.95rem;
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: termin;
}

.termin-howto li {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: 0.1rem 0.6rem;
  counter-increment: termin;
}

.termin-howto li::before {
  grid-row: span 2;
  padding-top: 0.1rem;
  color: var(--signal);
  content: counter(termin, decimal-leading-zero);
  font-size: 0.85rem;
  font-weight: 800;
}

.termin-howto strong {
  font-size: 0.95rem;
}

.termin-howto span {
  color: #625d56;
  font-size: 0.86rem;
  line-height: 1.5;
}

.termin-more {
  padding-top: 1.15rem;
  border-top: 1px solid var(--line-light);
}

.termin-more p {
  margin: 0 0 0.6rem;
  color: #3a3732;
  font-size: 0.9rem;
  line-height: 1.55;
}

.termin-more a {
  color: var(--signal);
  font-weight: 800;
}

.termin-more__proof {
  color: var(--ink) !important;
  font-weight: 700;
}

.termin-direct {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid var(--line-light);
  font-size: 0.88rem;
}

.termin-direct span {
  color: #6d675f;
}

.termin-direct a {
  font-weight: 800;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Der Sofortkontakt-Knopf "Erstgespräch buchen" ist auf dieser Seite überflüssig. */
body:has(.termin-section) .quick-contact__book {
  display: none;
}

@media (max-width: 1000px) {
  .termin-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .termin-aside {
    position: static;
  }

  .termin-summary {
    display: none;
  }
}

@media (max-width: 760px) {
  .termin-hero__grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 1.6rem;
  }

  .termin-person {
    display: flex;
    grid-row: 1;
    align-items: center;
    gap: 0.85rem;
  }

  .termin-person img {
    width: 3.6rem;
    height: 3.6rem;
    aspect-ratio: 1;
    border-radius: 50%;
  }

  .termin-person figcaption {
    margin: 0;
  }

  .termin-facts {
    margin-top: 1.3rem;
  }

  .termin-facts li {
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
  }
}

@media (max-width: 640px) {
  .termin-section {
    padding-block: 1.25rem 3rem;
  }

  .termin-section > .container {
    padding-inline: 0;
  }

  .termin-card {
    padding: 1.35rem 1rem 1.5rem;
    border-right: 0;
    border-left: 0;
    box-shadow: none;
  }

  .termin-aside {
    padding-inline: var(--gutter);
  }

  .termin-fields {
    grid-template-columns: minmax(0, 1fr);
  }

  .termin-times {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .termin-day {
    width: 4.9rem;
  }

  .termin-step__hint {
    width: 100%;
    margin-left: 2.75rem;
    margin-top: -0.5rem;
  }

  .termin-details div {
    grid-template-columns: minmax(0, 1fr);
    gap: 0.15rem;
  }

  .termin-actions .button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .termin-days {
    scroll-behavior: auto;
  }

  .termin-check circle,
  .termin-check path {
    animation: none;
    stroke-dashoffset: 0;
  }
}
