/* cheers – Betreiber
   Baut auf cheers.css und dash.css auf. Eine Spalte wie die Startseite, Karten untereinander. */

/* ---------- Location beanspruchen ---------- */

.claim { margin-top: var(--s6); }
.claim .planner { margin-top: 0; }
.claim__done > * + * { margin-top: var(--s2); }
.claim__done .btn { margin-top: var(--s4); }

.place-pick[data-selected] #place-search { display: none; }
.place-card {
  display: flex;
  align-items: center;
  gap: var(--s3);
  min-height: 56px;
  padding: var(--s2) var(--s2) var(--s2) var(--s4);
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: var(--r-md);
}
.place-card[hidden] { display: none; }
.place-card__icon { width: 20px; height: 20px; flex: none; color: var(--accent); }
.place-card__text { flex: 1 1 auto; min-width: 0; }
.place-card__name { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.place-card__address { font-size: var(--text-secondary); color: var(--text-muted); overflow-wrap: anywhere; }
.place-card .btn { flex: none; padding-inline: var(--s3); }

.role-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); column-gap: var(--s4); }

/* Ablauf */
.steps .stop__body { padding-bottom: var(--s5); }
.steps .stop:last-child .stop__body { padding-bottom: 0; }

/* Beispiel auf der Startseite für Betreiber */
.sample--insights > .meta { margin-bottom: var(--s3); }
.sample--insights .kpi { background: var(--surface-2); }
.kpis--sample .kpi__value { font-size: 1.75rem; }
@media (min-width: 640px) {
  .kpis--sample { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* ---------- Dashboard ---------- */

.dash-head { margin-bottom: var(--s5); }
.dash-head > * + * { margin-top: var(--s2); }
.insights > .notice { margin-bottom: var(--s4); }

.place-switch { display: flex; flex-wrap: wrap; gap: var(--s2); margin-bottom: var(--s4); }
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  max-width: 100%;
  padding: 0 var(--s4);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  color: var(--text-muted);
  font-size: var(--text-secondary);
  font-weight: 500;
  text-decoration: none;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  transition: border-color var(--dur-fast), color var(--dur-fast);
}
.chip:hover { border-color: var(--border-hover); color: var(--text); }
.chip[aria-current="page"] { border-color: var(--accent); background: var(--accent-tint); color: var(--text); }

.dash-range { display: grid; margin-bottom: var(--s4); }
@media (min-width: 640px) {
  .dash-range { min-width: 0; }
}

.kpis--3 .kpi__foot { line-height: 1.4; }
@media (min-width: 640px) {
  .kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
}
@media (min-width: 960px) {
  .kpis--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.card--spaced { margin-top: var(--s3); }
@media (min-width: 960px) {
  .card--spaced { margin-top: var(--s4); }
}
.card__note { margin-top: var(--s3); font-size: var(--text-meta); line-height: 1.5; color: var(--text-faint); }
.card__sub--first { margin-top: 0; }
.card .chart + .chart__table + .card__sub { margin-top: var(--s5); }
.card .rows { margin-top: var(--s1); }

.table-wrap--flush { margin-inline: calc(var(--s4) * -1); background: none; border: 0; border-radius: 0; }
@media (min-width: 768px) {
  .table-wrap--flush { margin-inline: calc(var(--s5) * -1); }
}
.table-wrap--flush .table th:first-child, .table-wrap--flush .table td:first-child { padding-left: var(--s4); }
@media (min-width: 768px) {
  .table-wrap--flush .table th:first-child, .table-wrap--flush .table td:first-child { padding-left: var(--s5); }
  .table-wrap--flush .table th:last-child, .table-wrap--flush .table td:last-child { padding-right: var(--s5); }
}

/* Trichter: Beschriftung über dem Balken, damit lange Namen nicht abgeschnitten werden */
.funnel { display: flex; flex-direction: column; gap: var(--s4); }
.funnel__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--s3); font-size: var(--text-secondary); }
.funnel__value { font-weight: 600; }
.funnel__track { display: flex; height: 10px; margin-top: 6px; border-radius: 3px; background: var(--surface-2); }
.funnel__fill { width: calc(var(--v) * 100%); min-width: 2px; height: 100%; border-radius: 3px; background: var(--chart); }
.funnel__row:nth-child(3) .funnel__fill { background: var(--accent); }
.funnel__note { margin-top: 4px; font-size: var(--text-meta); color: var(--text-faint); }

.highlight {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-bottom: var(--s4);
  padding: var(--s3) var(--s4);
  border-radius: var(--r-md);
  background: var(--accent-tint);
  font-size: var(--text-secondary);
  font-weight: 500;
}
.highlight svg { width: 16px; height: 16px; flex: none; color: var(--accent); }

.tags { display: flex; flex-wrap: wrap; gap: var(--s2); }
.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 0 var(--s3);
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  background: var(--surface-2);
  font-size: var(--text-secondary);
}
.tag__n { color: var(--text-faint); font-size: var(--text-meta); font-weight: 600; }

.wishes { border-top: 1px solid var(--border); }
.wish { padding-block: var(--s3); border-bottom: 1px solid var(--border); }
.wish:last-child { border-bottom: 0; padding-bottom: 0; }
.wish__text { font-size: var(--text-secondary); color: var(--text); overflow-wrap: anywhere; }
.wish__meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s1) var(--s2); margin-top: 4px; font-size: var(--text-meta); color: var(--text-faint); }
.sample .wishes { border-top: 0; }
.sample .wish:first-child { padding-top: 0; }

.quote { margin: 0; padding: var(--s1) 0 var(--s1) var(--s4); border-left: 2px solid var(--border-hover); }
.quote + .quote { margin-top: var(--s4); }
.quote p { font-size: var(--text-secondary); color: var(--text); text-wrap: pretty; }
.quote__meta { margin-top: 4px; font-size: var(--text-meta); color: var(--text-faint); }

.profile { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s2); }
@media (min-width: 640px) {
  .profile { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
}
.profile > div { min-width: 0; padding: var(--s3) var(--s4); background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-md); }
.profile dt { font-size: var(--text-meta); color: var(--text-faint); }
.profile dd { margin: 2px 0 0; font-size: var(--text-secondary); font-weight: 500; overflow-wrap: anywhere; }
.profile .state { display: inline; white-space: normal; }
.profile .state::before { display: inline-block; margin-right: 6px; vertical-align: 1px; }

.insights .status { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s2); }
.insights .status__item { padding: var(--s3); }
.insights .status dd { font-size: 1.125rem; font-weight: 600; }

.refresh { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s4); margin-top: var(--s4); }
.refresh .card__note { flex: 1 1 16rem; margin: 0; }
.refresh .btn__label { display: inline-flex; align-items: center; gap: var(--s2); }
.refresh .btn svg { width: 16px; height: 16px; }

.tips { display: flex; flex-direction: column; gap: var(--s2); margin-top: var(--s4); }
.tip { display: flex; align-items: flex-start; gap: var(--s3); font-size: var(--text-secondary); color: var(--text-muted); }
.tip svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--accent); }

.dash-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--s3) var(--s5); margin-top: var(--s5); }

/* ---------- Konto ---------- */

.place-list { margin-bottom: var(--s4); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); }
.place-list__item { display: flex; align-items: center; gap: var(--s2); min-height: 64px; padding: var(--s2) var(--s2) var(--s2) var(--s4); }
.place-list__item + .place-list__item { border-top: 1px solid var(--border); }
.place-list__main { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; padding-block: var(--s1); color: var(--text); text-decoration: none; }
a.place-list__main:hover .place-list__name { text-decoration: underline; text-decoration-color: var(--accent); text-underline-offset: 3px; }
.place-list__name { font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.place-list__meta { font-size: var(--text-secondary); color: var(--text-faint); overflow-wrap: anywhere; }
.setting .toggle { padding-block: 0; }

/* Hinweis unter der Ortssuche nur, solange nichts ausgewählt und kein Fehler da ist */
.place-pick[data-selected] ~ [data-place-hint],
.place-pick:has(#place-search[aria-invalid="true"]) ~ [data-place-hint] { display: none; }

/* ---------- Beispiel-Dashboard ---------- */

.sample-banner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--s3) var(--s4);
  margin-bottom: var(--s5);
  padding: var(--s3) var(--s3) var(--s3) var(--s4);
  border: 1px solid rgba(242, 179, 61, 0.45);
  border-radius: var(--r-md);
  background: var(--accent-tint);
  font-size: var(--text-secondary);
}
.sample-banner p { flex: 1 1 16rem; min-width: 0; }
.sample-banner .btn { flex: none; }
.sample-cta { margin-top: var(--s6); }
.sample-link { margin-top: var(--s4); }
