/* Aktien-Screener (S8) — gehört zu aktien-screener.php / .js.
   Farben wie die Aktienseiten (fomo-stil.css), hier fest eingetragen: Der
   Screener steht auch auf normalen Seiten (/aktien/, /aktien/schweiz/), wo
   die Variablen der Aktienseiten nicht geladen sind.
   `button.fs-…` statt reiner Klassen: Das Theme setzt
   `button:not(.menu-toggle)` mit höherer Spezifität (19px, fett). */

.fomo-screener {
	--fs-text: #141414; --fs-grau: #5a6b85; --fs-navy: #1A2D4A; --fs-blau: #3066b2;
	--fs-linie: #e4ebf5; --fs-hell: #F0F4FA;
	color: var(--fs-text); font-size: 15px; line-height: 1.45;
	margin: 0 0 2em; max-width: 100%; min-width: 0; position: relative;
}
.fomo-screener *, .fomo-screener *::before, .fomo-screener *::after { box-sizing: border-box; }
.fomo-screener .fs-laden, .fomo-screener .fs-fehler { color: var(--fs-grau); padding: 24px 0; }

/* Kopf: Treffer + Stand + Zurücksetzen */
.fomo-screener .fs-kopf {
	display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
	gap: 8px 16px; margin-bottom: 12px;
}
.fomo-screener .fs-zaehler { font-size: 17px; }
.fomo-screener .fs-zaehler strong { font-size: 22px; color: var(--fs-navy); }
.fomo-screener .fs-kopf-rechts { display: flex; align-items: baseline; gap: 16px; }
.fomo-screener .fs-stand { color: var(--fs-grau); font-size: 13px; }

button.fs-knopf-leise {
	background: none; border: 1px solid var(--fs-linie); border-radius: 6px;
	padding: 6px 12px; font-size: 14px; font-weight: 500; color: var(--fs-navy);
	cursor: pointer; font-family: inherit; line-height: 1.3;
}
button.fs-knopf-leise:hover:not(:disabled) { border-color: var(--fs-blau); color: var(--fs-blau); }
button.fs-knopf-leise:disabled { opacity: .4; cursor: default; }

/* Filterzeile */
.fomo-screener .fs-zeile, .fomo-screener .fs-felder {
	display: flex; flex-wrap: wrap; gap: 12px 14px; align-items: flex-end;
}
.fomo-screener .fs-zeile {
	background: var(--fs-hell); border-radius: 8px 8px 0 0; padding: 14px 16px;
}
.fomo-screener .fs-felder {
	border: 1px solid var(--fs-linie); border-top: none; border-radius: 0 0 8px 8px;
	padding: 14px 16px; margin-bottom: 16px; min-height: 70px;
}
.fomo-screener .fs-gruppe { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.fomo-screener .fs-gruppe > label {
	font-size: 12px; font-weight: 600; color: var(--fs-grau); letter-spacing: .02em; margin: 0;
}
.fomo-screener .fs-gruppe > label small { font-weight: 500; }
.fomo-screener .fs-hilfe { cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; }
.fomo-screener .fs-gruppe-suche { flex: 1 1 180px; max-width: 260px; }
.fomo-screener .fs-gruppe-spalten { margin-left: auto; }

.fomo-screener input.fs-eingabe, .fomo-screener select.fs-eingabe {
	height: 36px; padding: 6px 10px; font-size: 14px; font-family: inherit; color: var(--fs-text);
	background: #fff; border: 1px solid #c3d5ee; border-radius: 6px; width: 100%; margin: 0;
}
.fomo-screener input.fs-eingabe:focus, .fomo-screener select.fs-eingabe:focus {
	outline: none; border-color: var(--fs-blau); box-shadow: 0 0 0 2px rgba(48,102,178,.15);
}
/* Ausklappfelder (Quick Check, „Pro Seite“): eigenes Dreieck wie bei den
   Auswahlknöpfen statt des Browserpfeils, der am Rand klebt. */
.fomo-screener select.fs-eingabe {
	-webkit-appearance: none; appearance: none; padding-right: 30px; cursor: pointer;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='5'%3E%3Cpath d='M0 0h10L5 5z' fill='%235a6b85'/%3E%3C/svg%3E");
	background-repeat: no-repeat; background-position: right 11px center; background-size: 10px 5px;
}
.fomo-screener .fs-minmax { display: flex; gap: 4px; }
.fomo-screener input.fs-zahlfeld { width: 76px; text-align: right; }

/* Mehrfachauswahl */
.fomo-screener .fs-mehrfach { position: relative; }
button.fs-auswahl-knopf {
	height: 36px; min-width: 120px; max-width: 200px; padding: 6px 28px 6px 10px; text-align: left;
	font-size: 14px; font-weight: 400; font-family: inherit; color: var(--fs-text);
	background: #fff; border: 1px solid #c3d5ee; border-radius: 6px; cursor: pointer;
	white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; line-height: 1.6;
}
button.fs-auswahl-knopf::after {
	content: ''; position: absolute; right: 11px; top: 14px;
	border: 5px solid transparent; border-top-color: var(--fs-grau);
}
button.fs-auswahl-knopf.aktiv { border-color: var(--fs-blau); color: var(--fs-blau); font-weight: 600; }
.fomo-screener .fs-menue {
	display: none; position: absolute; z-index: 50; top: calc(100% + 4px); left: 0;
	background: #fff; border: 1px solid #c3d5ee; border-radius: 8px;
	box-shadow: 0 8px 24px rgba(26,45,74,.14); padding: 6px; min-width: 220px;
	max-height: 340px; overflow-y: auto;
}
.fomo-screener .fs-menue-rechts { left: auto; right: 0; }
.fomo-screener .offen > .fs-menue { display: block; }
.fomo-screener .fs-option {
	display: flex; align-items: center; gap: 8px; padding: 5px 8px; border-radius: 4px;
	font-size: 14px; font-weight: 400; color: var(--fs-text); cursor: pointer; margin: 0; white-space: nowrap;
}
.fomo-screener .fs-option:hover { background: var(--fs-hell); }
.fomo-screener .fs-option input { margin: 0; accent-color: var(--fs-blau); }
.fomo-screener .fs-option small { color: var(--fs-grau); margin-left: 4px; }
.fomo-screener .fs-menue-titel {
	font-size: 12px; font-weight: 600; color: var(--fs-grau); padding: 8px 8px 2px;
}

/* Spaltenmodus Automatisch | Fest */
.fomo-screener .fs-modus {
	display: flex; margin: 4px 8px 4px; border: 1px solid #c3d5ee; border-radius: 6px; overflow: hidden;
}
button.fs-modus-knopf {
	flex: 1; background: #fff; border: none; padding: 6px 10px; font-size: 13px; font-weight: 500;
	color: var(--fs-navy); cursor: pointer; font-family: inherit; line-height: 1.3;
}
button.fs-modus-knopf + button.fs-modus-knopf { border-left: 1px solid #c3d5ee; }
button.fs-modus-knopf.aktiv { background: var(--fs-blau); color: #fff; }
.fomo-screener .fs-modus-hinweis { font-size: 12px; color: var(--fs-grau); padding: 2px 8px 4px; white-space: normal; }
button.fs-link-knopf {
	background: none; border: none; padding: 2px 8px 8px; font-size: 13px; font-weight: 400;
	color: var(--fs-blau); text-decoration: underline; text-underline-offset: 2px;
	cursor: pointer; font-family: inherit; line-height: 1.3; text-align: left;
}
.fomo-screener .fs-menue-rechts { min-width: 260px; }

/* Reiter */
.fomo-screener .fs-reiter {
	display: flex; flex-wrap: wrap; gap: 2px; border: 1px solid var(--fs-linie); border-top: none;
	border-bottom: 1px solid var(--fs-linie); padding: 0 8px; background: #fff;
}
button.fs-reiter-knopf {
	background: none; border: none; border-bottom: 2px solid transparent; margin-bottom: -1px;
	padding: 9px 12px; font-size: 14px; font-weight: 500; color: var(--fs-grau);
	cursor: pointer; font-family: inherit; line-height: 1.3;
}
button.fs-reiter-knopf:hover { color: var(--fs-navy); }
button.fs-reiter-knopf.aktiv { color: var(--fs-blau); border-bottom-color: var(--fs-blau); font-weight: 600; }
.fomo-screener .fs-zahl:not(:empty) {
	display: inline-block; margin-left: 5px; min-width: 18px; padding: 0 5px; border-radius: 9px;
	background: var(--fs-blau); color: #fff; font-size: 11px; line-height: 18px; text-align: center;
}

/* KGV-Lage als Chips */
.fomo-screener .fs-lagen { display: flex; flex-wrap: wrap; gap: 4px; }
button.fs-chip {
	background: var(--fs-hell); border: 1px solid transparent; border-radius: 16px;
	padding: 6px 12px; font-size: 13px; font-weight: 500; color: var(--fs-navy);
	cursor: pointer; font-family: inherit; line-height: 1.3;
}
button.fs-chip:hover { border-color: #c3d5ee; }
button.fs-chip.aktiv { background: var(--fs-blau); color: #fff; }

/* Tabelle */
.fomo-screener .fs-tabelle-wrap {
	overflow-x: auto; max-width: 100%; border: 1px solid var(--fs-linie); border-radius: 8px;
	-webkit-overflow-scrolling: touch;
}
.fomo-screener table.fs-tabelle {
	border-collapse: separate; border-spacing: 0; width: 100%; margin: 0; font-size: 14px; border: none;
	table-layout: fixed;
}
.fomo-screener .fs-tabelle th, .fomo-screener .fs-tabelle td {
	padding: 8px 12px; border: none; border-bottom: 1px solid var(--fs-linie);
	white-space: nowrap; vertical-align: middle; text-align: left; background: #fff;
	overflow: hidden; text-overflow: ellipsis;
}
.fomo-screener .fs-tabelle thead th {
	position: sticky; top: 0; z-index: 2; background: var(--fs-hell);
	padding: 0; vertical-align: top;
}
button.fs-sort {
	display: block; width: 100%; background: none; border: none; padding: 9px 12px;
	font-size: 13px; font-weight: 600; color: var(--fs-navy); font-family: inherit;
	cursor: pointer; text-align: inherit; white-space: nowrap; line-height: 1.3;
}
/* inline-block + rechter Innenabstand für den Pfeil: Alle Zeilen einer
   umbrechenden Überschrift stehen bündig, der Pfeil verschiebt nichts. */
button.fs-sort .fs-titel { display: inline-block; position: relative; padding-right: 14px; white-space: normal; }
button.fs-sort small { display: block; font-weight: 500; color: var(--fs-grau); font-size: 11px; }
/* Pfeil hat immer seinen Platz — beim Sortieren verschiebt sich nichts. */
.fomo-screener .fs-pfeil { position: absolute; right: 0; bottom: 1px; width: 12px; text-align: center; font-size: 10px; visibility: hidden; }
.fomo-screener .fs-pfeil.an { visibility: visible; }
button.fs-sort:hover { color: var(--fs-blau); }
.fomo-screener .fs-sortiert button.fs-sort { color: var(--fs-blau); }
.fomo-screener .fs-tabelle .fs-r { text-align: right; font-variant-numeric: tabular-nums; }
.fomo-screener .fs-tabelle tbody tr:hover > * { background: #f7f9fd; }
.fomo-screener .fs-tabelle tbody tr:last-child > * { border-bottom: none; }

/* Erste Spalte (Name) bleibt beim Querscrollen stehen. */
.fomo-screener .fs-tabelle th:first-child {
	position: sticky; left: 0; z-index: 1; border-right: 1px solid var(--fs-linie);
}
.fomo-screener .fs-tabelle tbody th:first-child, .fomo-screener .fs-tabelle td.fs-umbruch { white-space: normal; }
.fomo-screener .fs-tabelle thead th:first-child { z-index: 3; }
.fomo-screener .fs-tabelle tbody th { font-weight: 400; }
.fomo-screener .fs-tabelle tbody th a {
	color: var(--fs-blau); text-decoration: underline; text-underline-offset: 2px; font-weight: 600;
}
.fomo-screener .fs-ticker { display: block; font-size: 12px; color: var(--fs-grau); }
.fomo-screener .fs-einheit { font-size: 12px; color: var(--fs-grau); }
.fomo-screener .fs-verzerrt { color: #a8760f; cursor: help; }
.fomo-screener .fs-leer { text-align: center; color: var(--fs-grau); padding: 32px 12px; }

.fomo-screener .fs-lage { font-size: 13px; }
.fomo-screener .fs-lage-0 { color: #1a7f4b; font-weight: 600; }
.fomo-screener .fs-lage-1 { color: #1a7f4b; }
.fomo-screener .fs-lage-3 { color: #b4500a; }
.fomo-screener .fs-lage-4 { color: #b4500a; font-weight: 600; }

.fomo-screener .fs-info {
	display: inline-block; width: 15px; height: 15px; margin-left: 5px; border-radius: 50%;
	background: var(--fs-grau); color: #fff; font-size: 10px; font-weight: 700; line-height: 15px;
	text-align: center; vertical-align: 1px; cursor: help;
}
.fomo-screener .fs-info:hover, .fomo-screener .fs-info:focus { background: var(--fs-blau); outline: none; }
.fomo-screener .fs-tipp {
	display: none; position: absolute; z-index: 60; background: #fff; color: var(--fs-text);
	border: 1px solid #c3d5ee; border-radius: 8px; box-shadow: 0 8px 24px rgba(26,45,74,.16);
	padding: 12px 14px; font-size: 13px; line-height: 1.45; text-align: left;
}
.fomo-screener .fs-tipp.an { display: block; }
.fomo-screener .fs-tipp ol { margin: 6px 0 8px 18px; padding: 0; }
.fomo-screener .fs-tipp li { margin: 0 0 2px; }
.fomo-screener .fs-tipp p { margin: 0 0 6px; }
.fomo-screener .fs-tipp p:last-child { margin: 0; }
.fomo-screener .fs-qc {
	display: inline-block; min-width: 38px; padding: 2px 8px; border-radius: 10px;
	font-size: 13px; font-weight: 600; text-align: center; text-decoration: none;
}
.fomo-screener a.fs-qc:hover { text-decoration: underline; }
.fomo-screener .fs-qc-gut { background: #e3f4ea; color: #1a7f4b; }
.fomo-screener .fs-qc-mittel { background: #fdf3dc; color: #8a6008; }
.fomo-screener .fs-qc-schwach { background: #fde8e4; color: #b4321a; }

.fomo-screener .fs-blaettern {
	display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 12px 16px; margin: 14px 0 6px;
	position: relative;
}
.fomo-screener .fs-pro-seite {
	display: flex; align-items: center; gap: 8px; margin: 0 auto 0 0;
	font-size: 14px; font-weight: 400; color: var(--fs-grau);
}
.fomo-screener .fs-pro-seite select.fs-eingabe { width: auto; min-width: 76px; height: 36px; padding: 6px 30px 6px 10px; }
.fomo-screener .fs-pro-seite ~ .fs-knopf-leise:last-child { margin-right: auto; }
.fomo-screener .fs-seite { color: var(--fs-grau); font-size: 14px; }
.fomo-screener .fs-hinweis { color: var(--fs-grau); font-size: 13px; margin: 10px 0 0; }
button.fs-filter-schalter { display: none; }

@media (max-width: 640px) {
	button.fs-filter-schalter {
		display: block; width: 100%; height: 42px; margin: 0; border-radius: 6px;
		background: var(--fs-blau); color: #fff; border: none; font-size: 15px; font-weight: 600;
		font-family: inherit; cursor: pointer;
	}
	.fomo-screener:not(.fs-filter-offen) .fs-zeile,
	.fomo-screener:not(.fs-filter-offen) .fs-reiter,
	.fomo-screener:not(.fs-filter-offen) .fs-felder { display: none; }
	.fomo-screener .fs-kopf-rechts { width: 100%; justify-content: space-between; }
	.fomo-screener .fs-pro-seite { width: 100%; justify-content: center; margin: 0; }
	.fomo-screener .fs-pro-seite ~ .fs-knopf-leise:last-child { margin-right: 0; }
	.fomo-screener .fs-zeile, .fomo-screener .fs-felder { padding: 12px; gap: 10px; }
	.fomo-screener .fs-gruppe-suche { max-width: none; flex-basis: 100%; }
	.fomo-screener .fs-gruppe-spalten { margin-left: 0; }
	button.fs-auswahl-knopf { min-width: 0; width: 100%; }
	.fomo-screener .fs-zeile > .fs-gruppe:not(.fs-gruppe-suche) { flex: 1 1 calc(50% - 10px); }
	.fomo-screener .fs-tabelle col:first-child { width: 150px !important; }
	.fomo-screener .fs-tabelle th, .fomo-screener .fs-tabelle td { padding: 7px 9px; }
	.fomo-screener .fs-reiter { overflow-x: auto; flex-wrap: nowrap; }
	button.fs-reiter-knopf { white-space: nowrap; }
}
