/* LightMapr - Spot Finder (spots.php, seit 2.4.0; Assistent seit 2.5.0). Farben aus app.css (hell/dunkel). */

.sf-expbadge { display: inline-block; vertical-align: middle; font-size: 13px; font-weight: 600; letter-spacing: 0.02em; padding: 2px 10px; border-radius: 12px;
  border: 1px solid var(--warn-line); background: var(--warn-bg); color: var(--warn-text); }
.sf-expnote { color: var(--muted); font-size: 14px; margin: 0 0 14px; }
button.sf-chip { font: inherit; color: var(--text); }
.sf-chip[aria-pressed="true"] { border-color: var(--accent); background: var(--info-bg); font-weight: 600; }
.sf-chip:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.sf-tag-fav { border-color: var(--band-good); color: var(--band-good); font-weight: 600; }
.sf-curate { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 12px 0; padding: 8px 12px; border: 1px dashed var(--warn-line); border-radius: var(--radius); background: var(--warn-bg); color: var(--warn-text); font-size: 14px; }
.sf-curate .pp-btn[aria-pressed="true"] { border-color: var(--accent); font-weight: 600; }
.sf-admin { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 8px 12px; font-size: 14px; }

/* Schrittanzeige */
.sf-steps { list-style: none; display: flex; gap: 4px; margin: 16px 0 10px; padding: 0; counter-reset: none; }
.sf-steps li { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 13px; color: var(--muted); text-align: center; }
.sf-steps li::before { content: ""; display: block; width: 100%; height: 4px; border-radius: 2px; background: var(--line); }
.sf-steps li.sf-done::before, .sf-steps li.sf-current::before { background: var(--accent); }
.sf-steps li.sf-done { cursor: pointer; }
.sf-steps li.sf-current { color: var(--text); font-weight: 600; }
.sf-stepno { display: none; }
.sf-steplabel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }

/* Karte mit dem aktuellen Schritt */
.sf-card { border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel-solid); padding: 18px 18px 0; }
.sf-panel h2 { font-size: 21px; line-height: 1.3; margin: 0 0 12px; }
.sf-panel h2:focus { outline: none; }
.sf-panel h3 { font-size: 16px; margin: 16px 0 4px; }
.sf-label { display: block; font-weight: 600; margin: 0 0 6px; }
.sf-help { color: var(--muted); margin: 0 0 10px; }
.sf-sub { color: var(--muted); font-size: 14px; }
.sf-msg { color: var(--err-text); margin: 10px 0 0; }
.sf-msg:empty { display: none; }

.sf-placebox { display: flex; gap: 8px; }
.sf-placebox input {
  flex: 1 1 auto; min-width: 0; font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  min-height: 44px; padding: 6px 10px; box-sizing: border-box;
}
.sf-placebox .pp-btn { flex: 0 0 auto; min-height: 44px; }
.sf-results { list-style: none; margin: 4px 0 0; padding: 0; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); max-height: 260px; overflow: auto; }
.sf-results li + li { border-top: 1px solid var(--line); }
.sf-result { display: block; width: 100%; text-align: left; font: inherit; color: var(--text); background: transparent; border: 0; padding: 10px 12px; min-height: 44px; cursor: pointer; }
.sf-result:hover, .sf-result:focus-visible { background: var(--info-bg); }
.sf-noresult { padding: 10px 12px; color: var(--muted); }
.sf-picked { margin: 6px 0 12px; color: var(--muted); min-height: 1.6em; }

/* Auswahl-Chips (Umkreis, Tag, Interessen) */
.sf-chips { border: 0; padding: 0; margin: 0 0 16px; }
.sf-chiprow, .sf-catlist { display: flex; flex-wrap: wrap; gap: 8px; }
.sf-chip { position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 20px; cursor: pointer; background: var(--bg); }
.sf-chip input[type="radio"] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sf-chip:has(input:checked) { border-color: var(--accent); background: var(--info-bg); font-weight: 600; }
.sf-chip:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Tageszeit */
.sf-phasegrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 8px; }
.sf-phasecard { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: var(--bg); }
.sf-phasecard input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sf-phasecard:has(input:checked) { border-color: var(--accent); background: var(--info-bg); }
.sf-phasecard:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.sf-phasename { font-weight: 600; }
.sf-phasesub { font-size: 13px; color: var(--muted); }

/* Motive mit Balken */
.sf-motifs { display: flex; flex-direction: column; gap: 6px; }
.sf-motif {
  display: grid; grid-template-columns: auto minmax(0, 1.4fr) minmax(70px, 1fr) 3.4em; grid-template-areas: "radio name meter val" ". state state state";
  align-items: center; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; background: var(--bg);
}
.sf-motif input { grid-area: radio; margin: 0; }
.sf-mname { grid-area: name; font-weight: 600; }
.sf-meter { grid-area: meter; width: 100%; height: 10px; accent-color: var(--accent); }
.sf-mval { grid-area: val; text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.sf-mstate { grid-area: state; font-size: 13px; color: var(--muted); }
.sf-motif.sf-possible .sf-mstate { color: var(--band-good); font-weight: 600; }
.sf-motif:has(input:checked) { border-color: var(--accent); background: var(--info-bg); }
.sf-motif.sf-disabled { opacity: 0.55; cursor: default; }
.sf-exp { font-weight: 400; color: var(--muted); }

/* Vorschlaege */
.sf-spots { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.sf-spotbtn {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; text-align: left; font: inherit; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; min-height: 56px; cursor: pointer;
}
.sf-spotbtn:hover, .sf-spotbtn:focus-visible { border-color: var(--accent); }
.sf-spotmain { display: flex; flex-direction: column; min-width: 0; }
.sf-spot-name { font-weight: 600; }
.sf-spot-meta { color: var(--muted); font-size: 14px; }
.sf-spot-score { flex: 0 0 auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.sf-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 4px; }
.sf-tag { font-size: 12px; padding: 1px 8px; border-radius: 10px; border: 1px solid var(--line); color: var(--muted); }
.sf-tag-reserve { border-color: var(--band-good); color: var(--band-good); }
.sf-tag-known { border-color: var(--accent); color: var(--accent); }
.sf-tag-blocked, .sf-tag-rain, .sf-tag-snow, .sf-tag-gust, .sf-tag-frost { border-color: var(--warn-line); color: var(--warn-text); background: var(--warn-bg); }
.sf-band-very_good, .sf-band-good { color: var(--band-good); }
.sf-band-medium { color: var(--sf-medium-ink); }   /* seit 2.15.1: --band-medium-text ist Schrift AUF Gelb, im dunklen Layout unlesbar */
.sf-band-bad, .sf-band-very_bad { color: var(--band-bad); }

/* Details */
.sf-dl { display: grid; grid-template-columns: minmax(0, 11em) 1fr; gap: 6px 14px; margin: 10px 0; }
.sf-dl dt { color: var(--muted); }
.sf-dl dd { margin: 0; }
.sf-view-blocked { color: var(--band-bad); }
.sf-view-partial { color: var(--sf-medium-ink); }
.sf-view-open { color: var(--band-good); }
.sf-reserve { background: var(--info-bg); border: 1px solid var(--info-line); border-radius: var(--radius); padding: 8px 12px; }
.sf-hint-list { margin: 2px 0; padding-left: 1.2em; }
.sf-links { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 4px 0; }
.sf-link { color: var(--accent); min-height: 36px; display: inline-flex; align-items: center; }

/* Laden */
.sf-progress { padding: 26px 4px; text-align: center; }
.sf-progress-title { font-weight: 600; margin: 0 0 10px; }
.sf-progress progress { width: 100%; max-width: 420px; height: 12px; accent-color: var(--accent); }
/* seit 2.23.0: drehender Kreis statt Ladebalken (der Balken blieb stehen und sprang dann) */
.sf-spinner { display: inline-block; width: 38px; height: 38px; border: 4px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: sf-spin 0.9s linear infinite; }
@keyframes sf-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .sf-spinner { animation-duration: 2.4s; } }
.sf-stepmsg { margin: 8px 0 0; color: var(--muted); }

/* Navigation */
.sf-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px -18px 0; padding: 12px 18px;
  border-top: 1px solid var(--line); background: var(--panel-solid); border-radius: 0 0 var(--radius) var(--radius);
  position: sticky; bottom: 0;
}
.sf-nav .pp-btn { min-height: 44px; min-width: 100px; }
.sf-nav .pp-btn[hidden] { display: none; }
.sf-where { color: var(--muted); font-size: 14px; margin: 0 auto; }
.pp-btn.sf-primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.pp-btn:disabled { opacity: 0.6; cursor: default; }

.sf-notes { margin-top: 24px; font-size: 13px; color: var(--muted); }
.sf-notes a { color: var(--accent); }

@media (max-width: 560px) {
  .sf-card { padding: 14px 12px 0; }
  .sf-nav { margin: 14px -12px 0; padding: 10px 12px; }
  .sf-steplabel { font-size: 11px; }
  .sf-placebox { flex-wrap: wrap; }
  .sf-placebox input { flex-basis: 100%; }
  .sf-placebox .pp-btn { flex: 1 1 0; }
  .sf-dl { grid-template-columns: 1fr; gap: 0; }
  .sf-dl dd { margin-bottom: 8px; }
}

/* Karten (seit 2.6.0) */
.sf-map { height: 360px; border: 1px solid var(--line); border-radius: var(--radius); margin: 8px 0 12px; background: var(--bg); }
.sf-map-small { height: 220px; pointer-events: none; }
.sf-map-small .leaflet-control-attribution { pointer-events: auto; }
.sf-map[hidden] { display: none; }
.sf-viewsel { margin: 0 0 10px; }
.sf-pin { display: flex; align-items: center; justify-content: center; border-radius: 50%; background: var(--accent); color: var(--accent-text); font-weight: 700; font-size: 13px; border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); }
.sf-pin-very_good, .sf-pin-good { background: #1f8a3b; }
.sf-pin-medium { background: #c98a00; }
.sf-pin-bad, .sf-pin-very_bad { background: #8a8a8a; }
.sf-warn { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 8px 12px; margin: 8px 0; }
.sf-steps + .sf-nav { margin: 0 0 10px; padding: 0; border: 0; background: transparent; position: static; border-radius: 0; }

/* seit 2.10.0: Filter der Vorschlaege (Schritt 5) */
.sf-filter { margin: 0 0 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; }
.sf-filter .sf-chips { margin: 0 0 8px; }
.sf-filter .sf-chip { min-height: 34px; padding: 0 12px; font-size: 14px; }
.sf-filterrow { display: flex; flex-wrap: wrap; gap: 10px 18px; }
.sf-field { display: flex; flex-direction: column; gap: 4px; min-width: 180px; flex: 0 1 280px; }
.sf-field select { min-height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--bg); color: inherit; font: inherit; }
.sf-admin-n { display: inline-block; min-width: 1.6em; padding: 0 6px; border-radius: 9px; background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-line); font-size: 12px; font-weight: 600; text-align: center; }
/* seit 2.10.1: gespeicherte Suche und "Neu starten" */
.sf-saved { margin: 0 0 10px; padding: 8px 12px; border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: 8px; font-size: 14px; color: var(--muted); }
.sf-nav .sf-restart { min-width: 0; }
@media (max-width: 520px) { .sf-where { display: none; } }
.sf-tag-photos { border-color: var(--band-good); color: var(--band-good); }
.sf-tag-nophotos { border-color: var(--line); color: var(--muted); }

/* seit 2.15.0: Details – Lagekarte und 24-Stunden-Verlauf */
.sf-map6 { height: 260px; }
.sf-links-top { margin: 4px 0 14px; }
.sf-series { margin: 4px 0 12px; }
.sf-strip { display: grid; grid-template-columns: 9em 1fr; gap: 2px 8px; align-items: center; font-size: 13px; margin: 3px 0; }
.sf-strip canvas { width: 100%; height: 18px; display: block; border-radius: 4px; background: var(--bg); border: 1px solid var(--line); }
.sf-strip-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sf-strip-axis { display: flex; justify-content: space-between; margin: 2px 0 0 calc(9em + 8px); font-size: 12px; color: var(--muted); }
@media (max-width: 560px) {
  .sf-strip { grid-template-columns: 6.5em 1fr; font-size: 12px; }
  .sf-strip-axis { margin-left: calc(6.5em + 8px); }
}

/* seit 2.15.1: Wert des Motivs als Marke, Knopf zur Karte, drei Links in einer Zeile */
:root { --sf-medium-ink: #7a5c00; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --sf-medium-ink: #e8c14a; } }
:root[data-theme="dark"] { --sf-medium-ink: #e8c14a; }
.sf-scoreline { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 12px 0 4px; }
.sf-scorebadge { display: inline-flex; align-items: center; min-height: 34px; padding: 0 12px; border-radius: 17px; font-weight: 700; font-size: 17px;
  font-variant-numeric: tabular-nums; color: #fff; background: var(--muted); }
.sf-badge-very_good { background: var(--band-very_good); }
.sf-badge-good { background: var(--band-good); }
.sf-badge-medium { background: var(--band-medium); color: var(--band-medium-text); }
.sf-badge-bad { background: var(--band-bad); }
.sf-badge-very_bad { background: var(--band-very_bad); }
.sf-scoretext { flex: 1 1 10em; color: var(--text); }
.pp-btn.sf-mapbtn { margin-left: auto; min-height: 40px; display: inline-flex; align-items: center; padding: 0 16px; border-radius: 20px; text-decoration: none;
  background: var(--accent); color: var(--accent-text); border-color: var(--accent); font-weight: 600; }
.sf-linkrow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0 14px; }
.sf-linkchip { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 6px; border: 1px solid var(--line); border-radius: 20px;
  color: var(--accent); background: var(--bg); text-decoration: none; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-linkchip:hover, .sf-linkchip:focus-visible { border-color: var(--accent); }
@media (max-width: 420px) { .sf-linkrow { gap: 6px; } .sf-linkchip { font-size: 12.5px; padding: 0 4px; } .pp-btn.sf-mapbtn { margin-left: 0; width: 100%; justify-content: center; } }
