/* ============================================================
   Selbsterntefeld Design System — component classes
   Ported from the design system's React components (.jsx, CSS
   injected at runtime). Class names match the source 1:1 so
   future design-system updates are easy to diff against.
   Source: Selbsterntefeld Design System/components/**
   ============================================================ */

/* ---- Surfaces · Card ---------------------------------------- */
/* Source: components/surfaces/Card.jsx */
.sef-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--spacing-lg);
  text-decoration: none;
  transition: var(--transition-normal);
}
a.sef-card,
.sef-card--interactive {
  cursor: pointer;
}
a.sef-card:hover,
.sef-card--interactive:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--border-brand);
  transform: translateY(-2px);
}
.sef-card--pad-sm {
  padding: var(--spacing-md);
}
.sef-card--pad-lg {
  padding: var(--spacing-xl);
}
.sef-card--flush {
  padding: 0;
  overflow: hidden;
}
.sef-card--accent {
  border-top: 3px solid var(--brand);
}
.sef-card__header {
  display: flex;
  align-items: center;
  gap: var(--spacing-sm);
  margin-bottom: var(--spacing-sm);
}
.sef-card__title {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--font-size-lg);
  color: var(--text-strong);
  margin: 0;
}

/* ---- Buttons · Button ----------------------------------------- */
/* Source: components/buttons/Button.jsx */
.sef-btn {
  --_bg: var(--brand);
  --_fg: var(--text-on-brand);
  --_bg-hover: var(--brand-strong);
  --_ring: var(--ring-brand);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5em;
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--font-size-base);
  line-height: 1.1;
  white-space: nowrap;
  border: none;
  border-radius: var(--radius-pill);
  cursor: pointer;
  padding: 0.7em 1.25em;
  min-height: var(--touch-min);
  background: var(--_bg);
  color: var(--_fg);
  text-decoration: none;
  transition: var(--transition-fast);
  box-shadow: var(--shadow-xs);
}
.sef-btn:hover {
  background: var(--_bg-hover);
  color: var(--_fg);
  box-shadow: var(--shadow-sm);
  transform: translateY(-1px);
}
.sef-btn:active {
  transform: translateY(0) scale(0.985);
  box-shadow: none;
}
.sef-btn:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--_ring);
}
.sef-btn[disabled],
.sef-btn[aria-disabled="true"] {
  background: var(--grey-200);
  color: var(--grey-400);
  cursor: not-allowed;
  box-shadow: none;
  transform: none;
  pointer-events: none;
}
.sef-btn--secondary {
  --_bg: var(--secondary-500);
  --_bg-hover: var(--secondary-600);
  --_ring: var(--secondary-300);
}
.sef-btn--danger {
  --_bg: var(--danger);
  --_bg-hover: var(--berry-700);
  --_ring: var(--berry-300);
}
.sef-btn--outline {
  --_bg: transparent;
  --_fg: var(--brand);
  --_bg-hover: var(--brand-soft);
  box-shadow: inset 0 0 0 2px var(--border-brand);
}
.sef-btn--outline:hover {
  box-shadow: inset 0 0 0 2px var(--primary-400);
}
.sef-btn--ghost {
  --_bg: transparent;
  --_fg: var(--brand);
  --_bg-hover: var(--brand-soft);
  box-shadow: none;
  min-height: auto;
  padding: 0.55em 0.9em;
}
.sef-btn--sm {
  font-size: var(--font-size-sm);
  padding: 0.45em 0.9em;
  min-height: 36px;
}
.sef-btn--lg {
  font-size: var(--font-size-lg);
  padding: 0.85em 1.6em;
}
.sef-btn--block {
  width: 100%;
}
.sef-btn__icon {
  display: inline-flex;
  width: 1.15em;
  height: 1.15em;
}
.sef-btn__icon img,
.sef-btn__icon svg {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* ---- Feedback · Badge ------------------------------------------ */
/* Source: components/feedback/Badge.jsx */
.sef-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4em;
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  font-size: var(--font-size-xs);
  line-height: 1;
  letter-spacing: 0.01em;
  padding: 0.4em 0.7em;
  border-radius: var(--radius-pill);
  background: var(--grey-100);
  color: var(--grey-700);
  white-space: nowrap;
}
.sef-badge__dot {
  width: 0.5em;
  height: 0.5em;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.9;
}
.sef-badge--success {
  background: var(--success-soft);
  color: var(--success-text);
}
.sef-badge--warning {
  background: var(--warning-soft);
  color: var(--warning-text);
}
.sef-badge--danger {
  background: var(--danger-soft);
  color: var(--danger-text);
}
.sef-badge--info {
  background: var(--info-soft);
  color: var(--info-text);
}
.sef-badge--brand {
  background: var(--brand-soft);
  color: var(--primary-800);
}
.sef-badge--solid.sef-badge--success {
  background: var(--success);
  color: #fff;
}
.sef-badge--solid.sef-badge--brand {
  background: var(--brand);
  color: #fff;
}

/* ---- Feedback · Tag --------------------------------------------- */
/* Source: components/feedback/Tag.jsx */
.sef-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  font-family: var(--font-sans);
  font-weight: var(--weight-medium);
  font-size: var(--font-size-sm);
  line-height: 1;
  padding: 0.4em 0.75em;
  border-radius: var(--radius-pill);
  background: var(--surface-card);
  color: var(--text-body);
  border: 1px solid var(--border-subtle);
  white-space: nowrap;
  transition: var(--transition-fast);
  text-decoration: none;
}
a.sef-tag:hover {
  border-color: var(--border-brand);
  background: var(--brand-tint);
  color: var(--primary-800);
}
.sef-tag--soft {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--primary-800);
}
.sef-tag__icon {
  width: 1.35em;
  height: 1.35em;
  object-fit: contain;
  margin-left: -0.15em;
}
.sef-tag--lg {
  font-size: var(--font-size-base);
  padding: 0.5em 0.9em;
}
.sef-tag--lg .sef-tag__icon {
  width: 1.6em;
  height: 1.6em;
}

/* ---- Feedback · Alert -------------------------------------------- */
/* Source: components/feedback/Alert.jsx */
.sef-alert {
  display: flex;
  gap: 0.7em;
  align-items: flex-start;
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  padding: 0.85em 1em;
  border-radius: var(--radius-md);
  background: var(--info-soft);
  color: var(--info-text);
  border: 1px solid hsl(200 50% 45% / 0.18);
}
.sef-alert__icon {
  flex: 0 0 auto;
  font-size: 1.1em;
  line-height: 1.4;
}
.sef-alert__body {
  flex: 1;
}
.sef-alert__body strong {
  font-weight: var(--weight-bold);
}
.sef-alert--success {
  background: var(--success-soft);
  color: var(--success-text);
  border-color: hsl(120 45% 40% / 0.2);
}
.sef-alert--warning {
  background: var(--warning-soft);
  color: var(--warning-text);
  border-color: hsl(45 75% 45% / 0.25);
}
.sef-alert--danger {
  background: var(--danger-soft);
  color: var(--danger-text);
  border-color: hsl(4 85% 50% / 0.2);
}
.sef-card.sef-alert--success {
  background: var(--success-soft);
  border-color: hsl(120 45% 40% / 0.2);
}
.sef-card.sef-alert--danger {
  background: var(--danger-soft);
  border-color: hsl(4 85% 50% / 0.2);
}

/* ---- Forms · shared field styles --------------------------------- */
/* Source: components/forms/Input.jsx (useFieldStyles, shared by Input/Select/Textarea/Checkbox) */
.sef-field {
  display: flex;
  flex-direction: column;
  gap: 0.4em;
  font-family: var(--font-sans);
}
.sef-field__label {
  font-size: var(--font-size-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-body);
}
.sef-field__hint {
  font-size: var(--font-size-xs);
  color: var(--text-muted);
}
.sef-field__error {
  font-size: var(--font-size-xs);
  color: var(--danger-text);
  font-weight: var(--weight-medium);
}
.sef-control {
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  color: var(--text-strong);
  background: var(--surface-card);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-md);
  padding: 0.65em 0.85em;
  min-height: var(--touch-min);
  width: 100%;
  transition: var(--transition-fast);
  appearance: none;
}
.sef-control::placeholder {
  color: var(--text-subtle);
}
.sef-control:hover {
  border-color: var(--border-strong);
}
.sef-control:focus-visible {
  outline: none;
  border-color: var(--ring-brand);
  box-shadow: 0 0 0 3px hsl(120 50% 55% / 0.35);
}
.sef-control[aria-invalid="true"] {
  border-color: var(--danger);
  box-shadow: 0 0 0 3px hsl(4 85% 56% / 0.25);
}
.sef-control:disabled {
  background: var(--grey-100);
  color: var(--text-subtle);
  cursor: not-allowed;
}
.sef-control--icon {
  padding-left: 2.6em;
}
.sef-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}
.sef-input-wrap__icon {
  position: absolute;
  left: 0.8em;
  width: 1.2em;
  height: 1.2em;
  object-fit: contain;
  pointer-events: none;
  opacity: 0.8;
}
.sef-select-wrap {
  position: relative;
}
.sef-select-wrap::after {
  content: "";
  position: absolute;
  right: 1em;
  top: 50%;
  width: 0.5em;
  height: 0.5em;
  border-right: 2px solid var(--text-muted);
  border-bottom: 2px solid var(--text-muted);
  transform: translateY(-65%) rotate(45deg);
  pointer-events: none;
}
.sef-select-wrap .sef-control {
  padding-right: 2.4em;
  cursor: pointer;
}
.sef-check {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--font-size-base);
  color: var(--text-body);
}
.sef-check input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}
.sef-check__box {
  width: 22px;
  height: 22px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border-strong);
  background: var(--surface-card);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-fast);
  flex: 0 0 auto;
}
.sef-check__box svg {
  width: 14px;
  height: 14px;
  stroke: #fff;
  stroke-width: 3.5;
  fill: none;
  opacity: 0;
  transition: var(--transition-fast);
}
.sef-check input:checked + .sef-check__box {
  background: var(--brand);
  border-color: var(--brand);
}
.sef-check input:checked + .sef-check__box svg {
  opacity: 1;
}
.sef-check input:focus-visible + .sef-check__box {
  box-shadow: 0 0 0 3px hsl(120 50% 55% / 0.4);
}

/* ---- Forms · FormRow ---------------------------------------------- */
/* Source: components/forms/FormRow.jsx */
.sef-formrow {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 8px 20px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--border-subtle);
}
.sef-formrow:last-child {
  border-bottom: none;
}
/* Inside a two-column group each cell is its own row; the trailing cell must
   keep its separator so paired fields (e.g. PLZ / Stadt) stay consistent. */
.adm-twocol > .sef-formrow:last-child {
  border-bottom: 1px solid var(--border-subtle);
}
.sef-formrow__label {
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-body);
  padding-top: 9px;
}
.sef-formrow__req {
  color: var(--danger);
  margin-left: 0.2em;
}
.sef-formrow__hint {
  display: block;
  font-weight: var(--weight-regular);
  font-size: var(--font-size-xs);
  color: var(--text-muted);
  margin-top: 2px;
}
.sef-formrow__control {
  min-width: 0;
}
.sef-formrow--stack {
  grid-template-columns: 1fr;
  gap: 6px;
}
@media (max-width: 640px) {
  .sef-formrow {
    grid-template-columns: 1fr;
    gap: 6px;
  }
  .sef-formrow__label {
    padding-top: 0;
  }
}

/* ---- Navigation · Tabs --------------------------------------------- */
/* Source: components/navigation/Tabs.jsx */
.sef-tabs {
  display: flex;
  gap: 2px;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
}
.sef-tab {
  appearance: none;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  font-weight: var(--weight-semibold);
  color: var(--text-muted);
  padding: 10px 14px;
  white-space: nowrap;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  transition: var(--transition-fast);
}
.sef-tab:hover {
  color: var(--text-body);
}
.sef-tab.is-active {
  color: var(--brand);
  border-bottom-color: var(--brand);
}
.sef-tab__count {
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  background: var(--grey-100);
  color: var(--text-muted);
  border-radius: var(--radius-pill);
  padding: 0.1em 0.55em;
  min-width: 1.6em;
  text-align: center;
}
.sef-tab.is-active .sef-tab__count {
  background: var(--brand-soft);
  color: var(--primary-800);
}

/* ---- Data display · Table ------------------------------------------ */
/* Source: components/data-display/Table.jsx. Interactive sort behavior is
   handled client-side by the existing public/js/sortable-table.js (see the
   .table-sortable class + data-sort-type attributes below), not by EJS. */
.sef-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  background: var(--surface-card);
  -webkit-overflow-scrolling: touch;
}
.sef-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
}
.sef-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-sunken);
  color: var(--text-muted);
  font-weight: var(--weight-bold);
  font-size: var(--font-size-xs);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  text-align: left;
  padding: 11px 14px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border-default);
}
.sef-table thead th.is-num {
  text-align: right;
}
.sef-table thead th.is-sortable {
  cursor: pointer;
  user-select: none;
}
.sef-table thead th.is-sortable:hover {
  color: var(--text-body);
}
.sef-table__sort {
  display: inline-block;
  width: 0.8em;
  margin-left: 0.3em;
  opacity: 0.5;
}
.sef-table thead th.is-active .sef-table__sort {
  opacity: 1;
  color: var(--brand);
}
.sef-table tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: top;
  color: var(--text-body);
}
.sef-table tbody td.is-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.sef-table tbody tr:last-child td {
  border-bottom: none;
}
.sef-table tbody tr {
  transition: background var(--duration-fast) var(--ease-out);
}
.sef-table tbody tr:hover {
  background: var(--brand-tint);
}
.sef-table--compact thead th {
  padding: 7px 12px;
}
.sef-table--compact tbody td {
  padding: 7px 12px;
}
.sef-table small {
  color: var(--text-muted);
  font-size: var(--font-size-xs);
  line-height: 1.4;
}
.sef-table__empty {
  padding: 28px;
  text-align: center;
  color: var(--text-subtle);
}

/* ---- Patterns · HeroBadge ------------------------------------------- */
/* Source: components/patterns/HeroBadge.jsx */
.sef-herobadge {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  padding: 0.5em 1em 0.5em 0.5em;
  border-radius: var(--radius-pill);
  background: linear-gradient(135deg, var(--primary-500), var(--primary-700));
  color: #fff;
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--font-size-lg);
  letter-spacing: 0.01em;
  box-shadow: var(--shadow-sm);
}
.sef-herobadge--blue {
  background: linear-gradient(135deg, var(--secondary-400), var(--secondary-600));
}
.sef-herobadge__icon {
  width: 2em;
  height: 2em;
  padding: 0.25em;
  border-radius: var(--radius-pill);
  background: #fff;
  object-fit: contain;
  flex: 0 0 auto;
}

/* ---- Patterns · Stat (KPI card, built on .sef-card) ------------------ */
/* Source: components/patterns/Stat.jsx */
.sef-stat {
  gap: 0.35em;
}
.sef-stat__label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  font-weight: var(--weight-medium);
  margin: 0;
}
.sef-stat__value {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  font-size: var(--font-size-2xl);
  color: var(--text-strong);
  line-height: 1.1;
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.4em;
}
.sef-stat__foot {
  margin-top: 0.5em;
}

/* ---- Patterns · LocationCard (built on .sef-card + .sef-tag) ---------- */
/* Source: components/patterns/LocationCard.jsx */
.sef-loc {
  gap: 0;
}
.sef-loc__head {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: var(--spacing-sm);
}
.sef-loc__pin {
  width: 26px;
  height: 32px;
  object-fit: contain;
  flex: 0 0 auto;
}
.sef-loc__brand {
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--text-subtle);
}
.sef-loc__title {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--font-size-lg);
  color: var(--text-strong);
  margin: 0;
  line-height: var(--leading-snug);
}
.sef-loc__owner {
  margin: 0.15em 0 0;
  font-size: var(--font-size-sm);
  font-weight: var(--weight-semibold);
  color: var(--primary-700);
}
.sef-loc__addr {
  margin: 0.25em 0 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}
.sef-loc__tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-md);
}
.sef-loc__more {
  align-self: center;
  font-size: var(--font-size-xs);
  color: var(--text-subtle);
  font-weight: var(--weight-medium);
}

/* ---- Patterns · ResultCard (picked-location detail, built on .sef-loc) - */
.result-card__body {
  display: flex;
  align-items: flex-start;
  gap: var(--spacing-md);
}
.result-card__main {
  flex: 1 1 auto;
  min-width: 0;
}
.result-card__main a {
  text-decoration: none;
}
.result-card__body .sef-btn {
  flex: 0 0 auto;
}
.result-card__section {
  font-size: var(--font-size-base);
  color: var(--text-strong);
  margin: var(--spacing-lg) 0 var(--spacing-sm);
}
.result-card__more {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
  margin: 0;
}
@media (max-width: 480px) {
  .result-card__body {
    flex-direction: column;
  }
  .result-card__body .sef-btn {
    width: 100%;
  }
}

/* ---- Patterns · OwnerCard (built on .sef-card + .sef-badge) ----------- */
/* Source: components/patterns/OwnerCard.jsx */
.sef-owner__head {
  display: flex;
  align-items: center;
  gap: 0.5em;
  margin-bottom: var(--spacing-sm);
}
.sef-owner__pin {
  width: 26px;
  height: 32px;
  object-fit: contain;
}
.sef-owner__brand {
  font-size: var(--font-size-xs);
  font-weight: var(--weight-bold);
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
  color: var(--secondary-500);
}
.sef-owner__title {
  font-family: var(--font-display);
  font-weight: var(--weight-semibold);
  font-size: var(--font-size-lg);
  color: var(--text-strong);
  margin: 0;
}
.sef-owner__addr {
  margin: 0.25em 0 0;
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}
.sef-owner__desc {
  margin: 0.6em 0 0;
  font-size: var(--font-size-sm);
  color: var(--text-body);
}
.sef-owner__counts {
  display: flex;
  flex-wrap: wrap;
  gap: var(--spacing-xs);
  margin-top: var(--spacing-md);
}

/* ---- Patterns · SeasonChart ------------------------------------------- */
/* Source: components/patterns/SeasonChart.jsx */
.sef-season {
  font-family: var(--font-sans);
  font-size: var(--font-size-sm);
  display: flex;
  flex-direction: column;
  gap: 0.4em;
}
.sef-season__head,
.sef-season__row {
  display: grid;
  grid-template-columns: 8.5rem 1fr;
  align-items: center;
  gap: 0.6em;
}
.sef-season__months,
.sef-season__cells {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 4px;
}
.sef-season__m {
  text-align: center;
  font-size: var(--font-size-xs);
  font-weight: var(--weight-semibold);
  color: var(--text-subtle);
  text-transform: uppercase;
}
.sef-season__m.is-now {
  color: var(--primary-700);
}
.sef-season__label {
  display: flex;
  align-items: center;
  gap: 0.4em;
  min-width: 0;
}
.sef-season__icon {
  width: 22px;
  height: 22px;
  object-fit: contain;
  flex: 0 0 auto;
}
.sef-season__name {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--text-body);
}
.sef-season__cell {
  height: 16px;
  border-radius: var(--radius-sm);
  background: var(--grey-100);
}
.sef-season__cell.on {
  background: var(--primary-400);
}
.sef-season__cell.now {
  box-shadow: inset 0 0 0 2px var(--primary-700);
}
.sef-season__cell.on.now {
  background: var(--primary-600);
}
@media (max-width: 480px) {
  .sef-season__head,
  .sef-season__row {
    grid-template-columns: 6rem 1fr;
  }
}

/* ---- Patterns · Search bar (home page map search) --------------------- */
.sef-search {
  margin-top: 8px;
}
.sef-search__row {
  display: flex;
  border: 2px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.sef-search__field {
  position: relative;
  flex: 1 1 0;
  min-width: 0;
  display: flex;
  align-items: center;
}
.sef-search__field:not(:last-child) {
  border-right: 1px solid var(--border-subtle);
}
.sef-search__field .sef-control {
  border: none;
  border-radius: 0;
  background: transparent;
  padding-right: 2.2em;
}
.sef-search__field .sef-control:focus {
  background: var(--surface-sunken);
}
.sef-search__icon-btn {
  width: 24px;
  height: 24px;
  cursor: pointer;
  margin-left: 8px;
  margin-right: 8px;
  flex-shrink: 0;
}
.sef-search .clear-icon {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  font-size: 22px;
  color: var(--danger);
  display: none;
  z-index: 2;
  user-select: none;
  background: transparent;
  border: none;
  padding: 0;
  line-height: 1;
}
.sef-search__radius {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.sef-search__radius.hidden {
  display: none;
}
.sef-search .radius-btn.active {
  background: var(--primary-600);
  color: #fff;
  border-color: var(--primary-600);
}

/* ---- Product items (season tag list fallback + marker-click detail card) */
.product-items-container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.product-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 2px;
  min-width: 80px;
  flex: 0 1 auto;
}
.product-icon {
  width: 40px;
  height: 40px;
  transition: transform 0.2s ease;
}
.product-icon:hover {
  transform: scale(1.1);
}
.product-label {
  font-size: var(--font-size-sm);
  text-align: center;
  max-width: 120px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ---- Multi-step wizard (feld-eintragen) -------------------------------- */
.wizard-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.wizard-progress {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}
.wizard-progress__step {
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 8px;
  text-align: center;
  background: var(--surface-card);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  transition: var(--transition-fast);
}
.wizard-progress__step.is-active,
.wizard-progress__step.is-complete {
  border-color: var(--primary-600);
  background: var(--primary-50);
}
.wizard-progress__number {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-subtle);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--weight-semibold);
  background: var(--surface-sunken);
  color: var(--text-body);
  transition: var(--transition-fast);
}
.wizard-progress__step.is-active .wizard-progress__number,
.wizard-progress__step.is-complete .wizard-progress__number {
  background: var(--primary-500);
  border-color: var(--primary-500);
  color: #fff;
}
.wizard-progress__label {
  font-size: var(--font-size-sm);
  color: var(--text-muted);
}
.wizard-step {
  display: none;
}
.wizard-step--active {
  display: block;
}
.wizard-navigation {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.wizard-navigation__actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.wizard-navigation__actions .wizard-submit {
  white-space: nowrap;
}
@media (max-width: 600px) {
  .wizard-progress {
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  }
  .wizard-navigation {
    flex-direction: column;
    align-items: stretch;
  }
  .wizard-navigation__actions {
    justify-content: flex-end;
  }
}

/* ---- Social/link icon rows (location + owner detail pages) ----------- */
.social-items-container,
.link-items-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
}
.social-item,
.link-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 8px;
  min-width: 80px;
  flex: 0 1 auto;
}
.social-icon {
  width: 32px;
  height: 32px;
  transition: transform 0.2s ease;
}
.social-icon:hover {
  transform: scale(1.1);
}
.social-icon-sm {
  width: 20px;
  height: 20px;
}
.wetter-widget {
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
  max-width: 100%;
}

/* ---- Search dropdown (pro/verify owner search) ------------------------ */
.sef-search-dropdown {
  position: relative;
  width: 100%;
}
#searchResults {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--surface-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  max-height: 300px;
  overflow-y: auto;
  z-index: 1000;
  box-shadow: var(--shadow-md);
  margin-top: 2px;
}
.search-result-item {
  padding: 8px;
  cursor: pointer;
  transition: var(--transition-fast);
}
.search-result-item:hover {
  background-color: var(--surface-sunken);
}

/* ---- Owner-edit GPS preview map + enrichment diff review -------------- */
.status-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background-color: transparent;
  transition: background-color 0.3s ease;
  vertical-align: middle;
  margin-left: 6px;
}
.status-dot.success { background-color: var(--success); }
.status-dot.danger { background-color: var(--danger); }
.status-dot.warning { background-color: var(--warning); }
.status-dot.info { background-color: var(--info); }

.field-afterglow {
  animation: field-afterglow 2s ease-out;
}
@keyframes field-afterglow {
  0% {
    background-color: var(--success-soft);
    border-color: var(--success);
  }
  100% {
    background-color: transparent;
    border-color: var(--border-subtle);
  }
}

.map-preview {
  width: 100%;
  min-width: 260px;
  height: 260px;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  position: relative;
  z-index: 0;
}
.map-preview--editable {
  border-color: var(--danger);
  box-shadow: 0 0 0 2px var(--danger);
}
.map-preview__pin {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -100%);
  z-index: 500;
  pointer-events: none;
  font-size: 1.5rem;
  line-height: 1;
}

#enrichReview .diff-row {
  display: flex;
  align-items: flex-start;
  gap: 4px;
  padding: 6px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  cursor: pointer;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 0;
}
#enrichReview .diff-row:hover {
  background: var(--surface-sunken);
}
#enrichReview .diff-row__empty {
  color: var(--text-subtle);
  font-style: italic;
}
#enrichReview .diff-row__field {
  display: flex;
  align-items: baseline;
  flex: 0 1 auto;
  min-width: 0;
  white-space: nowrap;
}
#enrichReview .diff-row__arrow {
  flex: 0 0 auto;
  line-height: 1.4;
}
#enrichReview .diff-row__result {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  flex: 1 1 auto;
  min-width: 0;
}
#enrichReview .diff-row__value {
  line-height: 1.4;
}
#enrichReview .diff-row__ai {
  display: block;
  margin-top: 2px;
  font-size: 0.85em;
  color: var(--text-muted);
  font-style: italic;
  line-height: 1.35;
}
@media (max-width: 768px) {
  #enrichReview .diff-row {
    width: 100%;
  }
  #enrichReview .diff-row__field {
    white-space: normal;
  }
}

/* ============================================================
   Header loading indicator used by public/js/sf.js
   ------------------------------------------------------------
   SF.showLoadingIndicator() toggles `.loading-indicator` on #main-nav.
   (Messages use the design-system .sef-alert component, rendered by
   SF.showMessage directly.) Ported from the legacy style.css onto the
   design-system tokens so the new layouts — which don't load style.css —
   keep this behaviour.
   ============================================================ */

/* ---- Inline "rewrite with AI" instruction controls ----
   The instruction input + OK/Abbrechen sit in a .pro-flow row next to the
   "Mit KI neu schreiben" button. The wrapper is toggled by JS via inline
   `display:''`/`none`, so its shown state must come from here: an aligned
   inline-flex cluster with an auto-width input (not the .sef-control 100%). */
#descriptionRewriteInstructionControls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
#descriptionRewriteInstructionControls .sef-control {
  width: auto;
  min-width: 16rem;
  min-height: 36px; /* match .sef-btn--sm so the row aligns */
  padding: 0.4em 0.7em;
  font-size: var(--font-size-sm);
}

/* ---- Header loading indicator (SF.showLoadingIndicator) ----
   Animates the sticky header's bottom border through the berry hue. */
.loading-indicator {
  animation: loadingBorder 1s linear infinite;
}
@keyframes loadingBorder {
  0% {
    border-bottom-color: var(--berry-50);
  }
  20% {
    border-bottom-color: var(--berry-200);
  }
  40% {
    border-bottom-color: var(--berry-400);
  }
  60% {
    border-bottom-color: var(--berry-600);
  }
  80% {
    border-bottom-color: var(--berry-800);
  }
  100% {
    border-bottom-color: var(--berry-900);
  }
}
@media (prefers-reduced-motion: reduce) {
  .loading-indicator {
    animation: none;
  }
}
