/* PP OTR UX-Overlay (pp-termine) — Fortschritt, Karten, Icons, ruhige Fuehrung.
   Wird NACH custom.css eingespeist und ueberlagert es bei Gleichstand. */

/* ============ Fortschrittsanzeige ============ */
.ppotr-steps {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 10px 0 22px;
  padding: 12px 16px;
  background: #fff;
  border: 1px solid rgba(15, 92, 99, .14);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 92, 99, .05);
  flex-wrap: nowrap;
  overflow-x: auto;
}
.ppotr-step {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  color: #7d9294;
  font-size: .92rem;
  font-weight: 600;
}
.ppotr-step .ppotr-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 2px solid #c4d6d7;
  color: #7d9294;
  font-size: .8rem;
  font-weight: 700;
  flex: 0 0 auto;
  background: #fff;
}
.ppotr-step.ist-aktuell { color: #0f5c63; }
.ppotr-step.ist-aktuell .ppotr-num {
  border-color: #0f5c63;
  background: #0f5c63;
  color: #fff;
}
.ppotr-step.ist-fertig { color: #3d7a80; }
.ppotr-step.ist-fertig .ppotr-num {
  border-color: #3d7a80;
  background: #e4f0f0;
  color: #0f5c63;
}
.ppotr-line {
  height: 2px;
  flex: 1 1 24px;
  min-width: 14px;
  background: #d8e5e6;
  border-radius: 2px;
}
.ppotr-line.ist-fertig { background: #3d7a80; }

/* Mobil: nur Nummern + aktuelles Label, alles kompakter */
@media (max-width: 640px) {
  .ppotr-steps { padding: 6px 8px; gap: 3px; }
  .ppotr-step { font-size: .85rem; gap: 5px; }
  .ppotr-step .ppotr-label { display: none; }
  .ppotr-step.ist-aktuell .ppotr-label { display: inline; }
  .ppotr-step .ppotr-num { width: 20px; height: 20px; font-size: .68rem; border-width: 1.5px; }
  .ppotr-line { min-width: 4px; }
}

/* ============ Gruppen-Karten (Start) ============ */
.leistungsgruppen a.list-group-item.ppotr-karte {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 18px !important;
  border: 1px solid rgba(15, 92, 99, .12);
  border-radius: 14px !important;
  margin-bottom: 10px;
  background: #fff;
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.leistungsgruppen a.list-group-item.ppotr-karte:hover,
.leistungsgruppen a.list-group-item.ppotr-karte:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(15, 92, 99, .35);
  box-shadow: 0 10px 24px -12px rgba(15, 92, 99, .35);
}
.ppotr-ico {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(15, 92, 99, .12), rgba(15, 92, 99, .05));
  color: #0f5c63;
  flex: 0 0 auto;
}
.ppotr-svg { width: 24px; height: 24px; }
.ppotr-svg-klein { width: 18px; height: 18px; }
.ppotr-karte-mitte {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 auto;
}
.ppotr-karte-titel {
  font-weight: 700;
  font-size: 1.02rem;
  color: #153a3e;
  line-height: 1.25;
}
.ppotr-karte-sub {
  font-size: .85rem;
  color: #648184;
  font-weight: 500;
}
.ppotr-pfeil {
  color: #9db8ba;
  flex: 0 0 auto;
  transition: transform .18s ease, color .18s ease;
}
.ppotr-karte:hover .ppotr-pfeil { transform: translateX(3px); color: #0f5c63; }

/* ============ Katalog: Uhr-Icon vor dem Leistungstitel */
.ppotr-ico-klein {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(15, 92, 99, .09);
  color: #0f5c63;
  margin-right: 10px;
  vertical-align: middle;
  flex: 0 0 auto;
}
.ppotr-kat-titel { display: flex !important; align-items: center; justify-content: flex-start !important; }

/* ============ Termin-Slots: ganze Zeile klickbar */
tr.ppotr-slot { cursor: pointer; }
tr.ppotr-slot:hover > th,
tr.ppotr-slot:hover > td { background: rgba(15, 92, 99, .06); }

/* ============ Buchungs-Zusammenfassung als Info-Karte */
table.ppotr-summary {
  width: 100%;
  max-width: 520px;
  background: #f2f8f8;
  border: 1px solid rgba(15, 92, 99, .16);
  border-left: 5px solid #0f5c63;
  border-radius: 12px;
  padding: 14px 16px;
  margin-bottom: 18px;
  border-collapse: separate;
  border-spacing: 0 4px;
}
table.ppotr-summary td {
  padding: 2px 8px 2px 0;
  font-size: .95rem;
  color: #2c4a4d;
}
table.ppotr-summary td:first-child { font-weight: 700; width: 90px; color: #0f5c63; }
table.ppotr-summary tr > strong,
table.ppotr-summary tr:first-child {
  color: #153a3e;
}

/* ============ Hinweis-Kasten (Login u. a.) */
.ppotr-hinweis {
  background: #f2f8f8;
  border: 1px solid rgba(15, 92, 99, .16);
  border-radius: 12px;
  padding: 14px 16px;
  margin: 0 0 18px;
  font-size: .95rem;
  color: #2c4a4d;
  max-width: 520px;
}
.ppotr-hinweis a { color: #0f5c63; font-weight: 700; }

/* ============ Intro-Text ruhiger */
.ppotr-intro-klein { color: #648184; font-size: .92rem; }

/* ============ Sanfte Gesamtform: Seite optisch zentrieren */
@media (min-width: 992px) {
  .container-xxl { max-width: 860px; }
}

/* ============ Standort-Wahl (0.40.0 Feedback, markant) ============ */
.ppotr-orte {
  display: flex;
  gap: 8px;
  margin: 0 0 18px;
  padding: 8px;
  background: #fff;
  border: 1px solid rgba(15, 92, 99, .18);
  border-radius: 14px;
  box-shadow: 0 2px 10px rgba(15, 92, 99, .06);
}
.ppotr-ort {
  flex: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 10px;
  font-weight: 800;
  font-size: 1.02rem;
  color: #0f5c63;
  text-decoration: none;
  border: 1.5px solid rgba(15, 92, 99, .28);
  background: #fff;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
}
.ppotr-ort svg { width: 18px; height: 18px; flex: 0 0 auto; }
.ppotr-orte-cap {
  align-self: center;
  font-size: .8rem;
  font-weight: 800;
  color: #648184;
  letter-spacing: .02em;
  padding-left: 6px;
  white-space: nowrap;
}
a.ppotr-ort:hover,
a.ppotr-ort:focus-visible {
  border-color: #0f5c63;
  box-shadow: 0 8px 18px -8px rgba(15, 92, 99, .45);
  transform: translateY(-1px);
  color: #0f5c63;
}
/* Inaktiver Standort bewusst ruhiger (aktiver traegt Haken + Petrol) */
a.ppotr-ort { color: #6b8588; border-color: rgba(15, 92, 99, .18); }
.ppotr-ort.ist-aktiv {
  background: #0f5c63;
  border-color: #0f5c63;
  color: #fff;
  cursor: default;
  box-shadow: 0 6px 14px -6px rgba(15, 92, 99, .5);
}

/* ============ Terminsuche: Filter links, Ergebnis breit ============ */
@media (min-width: 992px) {
  .ppotr-suche-grid { display: flex; gap: 22px; align-items: flex-start; }
  .ppotr-suche-grid .ppotr-suche-filter {
    flex: 0 0 300px;
    background: #fff;
    border: 1px solid rgba(15, 92, 99, .14);
    border-radius: 14px;
    padding: 18px 16px 8px;
    box-shadow: 0 2px 10px rgba(15, 92, 99, .05);
  }
  .ppotr-suche-grid .ppotr-suche-ergebnis { flex: 1 1 auto; min-width: 0; }
}
/* Innerhalb der Filter-Karte stapeln Label und Feld (THEORG setzt
   Bootstrap-Spalten nebeneinander - zu eng fuer 300px) */
.ppotr-suche-filter .row > [class*="col"] {
  width: 100% !important;
  flex: 0 0 100% !important;
  max-width: 100% !important;
}
.ppotr-suche-filter .col-form-label { padding-left: 0; }
.ppotr-suche-filter .btn { width: 100%; }

/* ============ Tages-Karten mit Zeit-Pillen ============ */
.ppotr-tage {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  padding: 14px;
}
.ppotr-tag {
  background: #f7fbfb;
  border: 1px solid rgba(15, 92, 99, .10);
  border-radius: 12px;
  padding: 10px 12px;
}
.ppotr-tag-kopf {
  font-weight: 800;
  color: #153a3e;
  font-size: .9rem;
  margin-bottom: 8px;
}
.ppotr-zeiten { display: flex; flex-wrap: wrap; gap: 6px; }
.ppotr-zeit {
  display: inline-flex;
  padding: 6px 11px;
  border-radius: 999px;
  border: 1.5px solid rgba(15, 92, 99, .3);
  color: #0f5c63;
  font-weight: 700;
  font-size: .88rem;
  text-decoration: none;
  background: #fff;
  transition: all .15s ease;
}
.ppotr-zeit:hover,
.ppotr-zeit:focus-visible {
  background: #0f5c63;
  border-color: #0f5c63;
  color: #fff;
  transform: translateY(-1px);
}
@media (max-width: 640px) {
  .ppotr-tage { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); padding: 10px; gap: 10px; }
}

/* ============ Kontext-Zeile (Breadcrumb) modern ============ */
.breadcrumb {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, .72);
  border: 1px solid rgba(15, 92, 99, .10);
  border-radius: 999px;
  font-size: .83rem;
  width: fit-content;
  max-width: 100%;
  backdrop-filter: blur(6px);
  list-style: none;
}
.breadcrumb-item {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
  color: #7d9294;
  font-weight: 600;
}
.breadcrumb-item + .breadcrumb-item::before {
  content: "\203A ";/* › */
  color: #b3c6c8;
  padding: 0 2px;
  font-weight: 400;
  float: none;
}
.breadcrumb .breadcrumb-item a { color: #648184; text-decoration: none; }
.breadcrumb .breadcrumb-item a:hover { color: #0f5c63; }
.breadcrumb-item:last-child,
.breadcrumb-item:last-child a { color: #0f5c63; font-weight: 700; }
/* Mobil: nur die letzten zwei Teile zeigen, Rest hinter „…";
   der sichtbare Rest darf in der Kapsel sauber umbrechen */
@media (max-width: 640px) {
  .breadcrumb {
    font-size: .78rem;
    padding: 7px 12px;
    max-width: 100%;
    flex-wrap: wrap;
    border-radius: 14px;
    row-gap: 2px;
  }
  .breadcrumb-item { white-space: normal; }
  .breadcrumb-item:nth-last-child(n+3) { display: none; }
  .breadcrumb:has(.breadcrumb-item:nth-last-child(n+3))::before {
    content: "\2026 ";/* … */
    color: #b3c6c8;
    font-weight: 700;
  }
}

/* ============ Moderne Mikro-Animationen ============ */
@keyframes ppotrAuftritt {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}
.ppotr-orte { animation: ppotrAuftritt .35s ease both; }
.ppotr-steps { animation: ppotrAuftritt .35s ease .05s both; }
h4.mb-0 { animation: ppotrAuftritt .35s ease .1s both; }
.leistungsgruppen .ppotr-karte,
.ppotr-tage .ppotr-tag,
.ppotr-suche-filter,
.ppotr-suche-ergebnis,
.list-group:not(.leistungsgruppen) .list-group-item {
  animation: ppotrAuftritt .4s ease both;
}
.leistungsgruppen .ppotr-karte:nth-child(2) { animation-delay: .05s; }
.leistungsgruppen .ppotr-karte:nth-child(3) { animation-delay: .1s; }
.leistungsgruppen .ppotr-karte:nth-child(4) { animation-delay: .15s; }
.leistungsgruppen .ppotr-karte:nth-child(5) { animation-delay: .2s; }
.leistungsgruppen .ppotr-karte:nth-child(6) { animation-delay: .25s; }
.ppotr-tage .ppotr-tag:nth-child(3n) { animation-delay: .05s; }
.ppotr-tage .ppotr-tag:nth-child(3n+1) { animation-delay: .1s; }

/* Aktiver Schritt: einmal sanft aufpulsen */
@keyframes ppotrPuls {
  0%   { box-shadow: 0 0 0 0 rgba(15, 92, 99, .45); }
  100% { box-shadow: 0 0 0 12px rgba(15, 92, 99, 0); }
}
.ppotr-step.ist-aktuell .ppotr-num { animation: ppotrPuls 1.2s ease .3s 1; }

/* Primaer-Buttons: dezenter Glanzstreif beim Hover */
.btn-primary { position: relative; overflow: hidden; }
.btn-primary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .25), transparent);
  transform: skewX(-20deg);
  transition: left .5s ease;
  pointer-events: none;
}
.btn-primary:hover::after { left: 130%; }

/* Druck-Gefuehl */
.ppotr-zeit:active,
.ppotr-karte:active,
.ppotr-ort:active { transform: scale(.97); }

/* Bewegung aus, wenn das System es wuenscht */
@media (prefers-reduced-motion: reduce) {
  .ppotr-orte, .ppotr-steps, h4.mb-0,
  .leistungsgruppen .ppotr-karte,
  .ppotr-tage .ppotr-tag,
  .ppotr-suche-filter, .ppotr-suche-ergebnis,
  .list-group:not(.leistungsgruppen) .list-group-item,
  .ppotr-step.ist-aktuell .ppotr-num { animation: none !important; }
  * { transition: none !important; }
}

/* ============ Filter-Chips (Tageszeit + Therapeut) ============ */
.ppotr-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 4px 0 14px;
}
.ppotr-chip {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 7px 13px;
  border-radius: 10px;
  border: 1.5px solid rgba(15, 92, 99, .25);
  background: #fff;
  color: #0f5c63;
  font-weight: 700;
  font-size: .85rem;
  line-height: 1.2;
  cursor: pointer;
  font-family: inherit;
  transition: all .15s ease;
}
.ppotr-chip:hover { border-color: #0f5c63; box-shadow: 0 4px 10px -4px rgba(15, 92, 99, .3); }
.ppotr-chip:active { transform: scale(.96); }
.ppotr-chip.ist-aktiv {
  background: #0f5c63;
  border-color: #0f5c63;
  color: #fff;
}
.ppotr-chip-sub { font-size: .68rem; font-weight: 600; opacity: .78; }
/* Tageszeit: 2x2-Raster, Ganzer Tag oben ueber die volle Breite */
.ppotr-chips--grid { display: grid; grid-template-columns: 1fr 1fr; }
.ppotr-chips--grid .ppotr-chip:first-child { grid-column: 1 / -1; }
/* Therapeuten: kompakter */
.ppotr-chips--kompakt .ppotr-chip { padding: 5px 10px; font-size: .8rem; border-radius: 999px; }

/* Tageszeit mobil: Ganzer Tag wie die anderen halbe Breite -> 2x2 statt 3 Zeilen */
@media (max-width: 640px) {
  .ppotr-chips--grid .ppotr-chip:first-child { grid-column: auto; }
}

/* Standort-Caption mobil ueber die volle Breite */
@media (max-width: 640px) {
  .ppotr-orte { flex-wrap: wrap; }
  .ppotr-orte-cap { flex: 0 0 100%; padding: 2px 6px 6px; }
}

/* ============ „Termin in Kalender speichern" (Erfolgsseite) ============ */
.ppotr-kalbtn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 18px;
  padding: 12px 20px;
  border: none;
  border-radius: 12px;
  background: #0f5c63;
  color: #fff;
  font-weight: 800;
  font-size: .95rem;
  font-family: inherit;
  cursor: pointer;
  box-shadow: 0 8px 18px -8px rgba(15, 92, 99, .5);
  transition: transform .18s ease, box-shadow .18s ease;
}
.ppotr-kalbtn svg { width: 19px; height: 19px; }
.ppotr-kalbtn:hover { transform: translateY(-1px); box-shadow: 0 12px 22px -8px rgba(15, 92, 99, .55); }
.ppotr-kalbtn:active { transform: scale(.97); }
