.fahrtenbuch-login-notice {
	max-width: 420px;
	margin: 24px auto;
	padding: 32px 28px;
	background: #f6f7f7;
	border-radius: 8px;
	text-align: center;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fahrtenbuch-login-notice__text {
	margin: 0 0 20px;
	font-size: 16px;
}

.fahrtenbuch-login-notice__button .wp-element-button,
.fahrtenbuch-login-notice__button button,
.fahrtenbuch-login-notice__button a {
	font: inherit;
}

#fahrtenbuch-toern-form-root,
#fahrtenbuch-dashboard-root,
#fahrtenbuch-boat-manager-root,
#fahrtenbuch-training-groups-root,
#fahrtenbuch-persons-root,
#fahrtenbuch-regattas-root,
#fahrtenbuch-trainings-root,
#fahrtenbuch-logbook-root {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 960px;
}

#fahrtenbuch-toern-form-root .fb-card,
#fahrtenbuch-dashboard-root .fb-card,
#fahrtenbuch-boat-manager-root .fb-card,
#fahrtenbuch-training-groups-root .fb-card,
#fahrtenbuch-persons-root .fb-card,
#fahrtenbuch-regattas-root .fb-card,
#fahrtenbuch-trainings-root .fb-card,
#fahrtenbuch-logbook-root .fb-card {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 18px 20px;
	margin-bottom: 20px;
}

#fahrtenbuch-toern-form-root h2,
#fahrtenbuch-toern-form-root h3,
#fahrtenbuch-dashboard-root h2,
#fahrtenbuch-boat-manager-root h2,
#fahrtenbuch-boat-manager-root h3,
#fahrtenbuch-training-groups-root h2,
#fahrtenbuch-training-groups-root h3,
#fahrtenbuch-persons-root h2,
#fahrtenbuch-persons-root h3,
#fahrtenbuch-regattas-root h2,
#fahrtenbuch-regattas-root h3,
#fahrtenbuch-trainings-root h2,
#fahrtenbuch-trainings-root h3,
#fahrtenbuch-logbook-root h2,
#fahrtenbuch-logbook-root h3 {
	margin-top: 0;
}

#fahrtenbuch-toern-form-root .fb-table,
#fahrtenbuch-dashboard-root .fb-table,
#fahrtenbuch-boat-manager-root .fb-table,
#fahrtenbuch-training-groups-root .fb-table,
#fahrtenbuch-persons-root .fb-table,
#fahrtenbuch-regattas-root .fb-table,
#fahrtenbuch-trainings-root .fb-table,
#fahrtenbuch-logbook-root .fb-table {
	width: 100%;
	border-collapse: collapse;
}

#fahrtenbuch-toern-form-root .fb-table th,
#fahrtenbuch-toern-form-root .fb-table td,
#fahrtenbuch-dashboard-root .fb-table th,
#fahrtenbuch-dashboard-root .fb-table td,
#fahrtenbuch-boat-manager-root .fb-table th,
#fahrtenbuch-boat-manager-root .fb-table td,
#fahrtenbuch-training-groups-root .fb-table th,
#fahrtenbuch-training-groups-root .fb-table td,
#fahrtenbuch-persons-root .fb-table th,
#fahrtenbuch-persons-root .fb-table td,
#fahrtenbuch-regattas-root .fb-table th,
#fahrtenbuch-regattas-root .fb-table td,
#fahrtenbuch-trainings-root .fb-table th,
#fahrtenbuch-trainings-root .fb-table td,
#fahrtenbuch-logbook-root .fb-table th,
#fahrtenbuch-logbook-root .fb-table td {
	text-align: left;
	padding: 8px 10px;
	border-bottom: 1px solid #eee;
}

#fahrtenbuch-toern-form-root .fb-form-row,
#fahrtenbuch-dashboard-root .fb-form-row,
#fahrtenbuch-boat-manager-root .fb-form-row,
#fahrtenbuch-training-groups-root .fb-form-row,
#fahrtenbuch-persons-root .fb-form-row,
#fahrtenbuch-regattas-root .fb-form-row,
#fahrtenbuch-trainings-root .fb-form-row,
#fahrtenbuch-logbook-root .fb-form-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-bottom: 12px;
	align-items: flex-end;
}

#fahrtenbuch-toern-form-root .fb-section-grid,
#fahrtenbuch-regattas-root .fb-section-grid,
#fahrtenbuch-trainings-root .fb-section-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
	gap: 10px;
	margin-bottom: 12px;
}

#fahrtenbuch-toern-form-root .fb-field,
#fahrtenbuch-dashboard-root .fb-field,
#fahrtenbuch-boat-manager-root .fb-field,
#fahrtenbuch-training-groups-root .fb-field,
#fahrtenbuch-persons-root .fb-field,
#fahrtenbuch-regattas-root .fb-field,
#fahrtenbuch-trainings-root .fb-field,
#fahrtenbuch-logbook-root .fb-field {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 150px;
}

#fahrtenbuch-toern-form-root .fb-field label,
#fahrtenbuch-dashboard-root .fb-field label,
#fahrtenbuch-boat-manager-root .fb-field label,
#fahrtenbuch-training-groups-root .fb-field label,
#fahrtenbuch-persons-root .fb-field label,
#fahrtenbuch-regattas-root .fb-field label,
#fahrtenbuch-trainings-root .fb-field label,
#fahrtenbuch-logbook-root .fb-field label {
	font-weight: 600;
	font-size: 12px;
}

#fahrtenbuch-toern-form-root input,
#fahrtenbuch-toern-form-root select,
#fahrtenbuch-toern-form-root textarea,
#fahrtenbuch-dashboard-root input,
#fahrtenbuch-dashboard-root select,
#fahrtenbuch-boat-manager-root input,
#fahrtenbuch-boat-manager-root select,
#fahrtenbuch-training-groups-root input,
#fahrtenbuch-training-groups-root select,
#fahrtenbuch-persons-root input,
#fahrtenbuch-regattas-root input,
#fahrtenbuch-regattas-root select,
#fahrtenbuch-regattas-root textarea,
#fahrtenbuch-trainings-root input,
#fahrtenbuch-trainings-root select,
#fahrtenbuch-logbook-root select {
	padding: 7px 9px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
}

#fahrtenbuch-toern-form-root .fb-checkbox,
#fahrtenbuch-boat-manager-root .fb-checkbox,
#fahrtenbuch-training-groups-root .fb-checkbox,
#fahrtenbuch-regattas-root .fb-checkbox,
#fahrtenbuch-trainings-root .fb-checkbox {
	flex-direction: row;
	align-items: center;
}

#fahrtenbuch-toern-form-root input:disabled,
#fahrtenbuch-toern-form-root select:disabled,
#fahrtenbuch-toern-form-root textarea:disabled,
#fahrtenbuch-boat-manager-root input:disabled,
#fahrtenbuch-boat-manager-root select:disabled,
#fahrtenbuch-training-groups-root input:disabled,
#fahrtenbuch-training-groups-root select:disabled,
#fahrtenbuch-regattas-root input:disabled,
#fahrtenbuch-regattas-root select:disabled,
#fahrtenbuch-regattas-root textarea:disabled,
#fahrtenbuch-trainings-root input:disabled,
#fahrtenbuch-trainings-root select:disabled {
	background: #f0f0f1;
	color: #8c8f94;
	cursor: not-allowed;
}

/*
 * Bewusst KEINE eigene Farbe/Form für Buttons: die JS-Komponenten setzen
 * die WordPress-Standardklasse "wp-element-button", damit Buttons die
 * Formatierung des aktiven Themes (Global Styles / theme.json) übernehmen
 * statt eines fest codierten Plugin-Looks. Nur die bewusst zurückhaltende
 * Sekundär-Variante bekommt einen dezenten Rahmen.
 *
 * "font: inherit" ist trotzdem nötig: Browser vererben Schriftart/-größe
 * bei <button> NICHT automatisch vom umgebenden Text (UA-Stylesheet nutzt
 * die System-Steuerelement-Schrift), daher wirkt ein Button sonst kleiner
 * als der restliche Theme-Text, selbst wenn das Theme keine eigene Regel
 * für Buttons definiert.
 */
#fahrtenbuch-toern-form-root button,
#fahrtenbuch-dashboard-root button,
#fahrtenbuch-boat-manager-root button,
#fahrtenbuch-training-groups-root button,
#fahrtenbuch-persons-root button,
#fahrtenbuch-regattas-root button,
#fahrtenbuch-trainings-root button,
#fahrtenbuch-logbook-root button,
#fahrtenbuch-logbook-root a.wp-element-button {
	font: inherit;
}

/*
 * Abstand über "echten" Aktions-Buttons (wp-element-button, z.B.
 * "Speichern"/"Anlegen"): Elemente wie .fb-field oder <textarea> haben
 * bewusst keinen margin-bottom (sie stehen oft dicht an dicht in einem
 * .fb-form-row), daher klebt ein direkt folgender Button sonst ohne
 * Abstand am vorherigen Feld -- das ist ein Layout-Versehen unsererseits,
 * nicht das Theme. Innerhalb einer Formularzeile (.fb-form-row) steht der
 * Button dagegen absichtlich neben Eingabefeldern und bleibt dort bündig
 * mit ihnen ausgerichtet (der Zeilenabstand kommt schon vom "gap" der
 * Zeile selbst).
 */
#fahrtenbuch-toern-form-root .wp-element-button,
#fahrtenbuch-dashboard-root .wp-element-button,
#fahrtenbuch-boat-manager-root .wp-element-button,
#fahrtenbuch-training-groups-root .wp-element-button,
#fahrtenbuch-persons-root .wp-element-button,
#fahrtenbuch-regattas-root .wp-element-button,
#fahrtenbuch-trainings-root .wp-element-button,
#fahrtenbuch-logbook-root .wp-element-button {
	margin-top: 12px;
}

#fahrtenbuch-toern-form-root .fb-form-row .wp-element-button,
#fahrtenbuch-dashboard-root .fb-form-row .wp-element-button,
#fahrtenbuch-boat-manager-root .fb-form-row .wp-element-button,
#fahrtenbuch-training-groups-root .fb-form-row .wp-element-button,
#fahrtenbuch-persons-root .fb-form-row .wp-element-button,
#fahrtenbuch-regattas-root .fb-form-row .wp-element-button,
#fahrtenbuch-trainings-root .fb-form-row .wp-element-button,
#fahrtenbuch-logbook-root .fb-form-row .wp-element-button {
	margin-top: 0;
}

#fahrtenbuch-toern-form-root button.fb-secondary,
#fahrtenbuch-dashboard-root button.fb-secondary,
#fahrtenbuch-boat-manager-root button.fb-secondary,
#fahrtenbuch-training-groups-root button.fb-secondary,
#fahrtenbuch-regattas-root button.fb-secondary,
#fahrtenbuch-trainings-root button.fb-secondary {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
}

#fahrtenbuch-toern-form-root .fb-link-button,
#fahrtenbuch-dashboard-root .fb-link-button,
#fahrtenbuch-boat-manager-root .fb-link-button,
#fahrtenbuch-training-groups-root .fb-link-button,
#fahrtenbuch-persons-root .fb-link-button,
#fahrtenbuch-regattas-root .fb-link-button,
#fahrtenbuch-trainings-root .fb-link-button,
#fahrtenbuch-logbook-root .fb-link-button {
	background: none;
	border: none;
	color: #2271b1;
	text-decoration: underline;
	cursor: pointer;
	padding: 0;
}

#fahrtenbuch-toern-form-root .fb-link-button.danger,
#fahrtenbuch-dashboard-root .fb-link-button.danger,
#fahrtenbuch-boat-manager-root .fb-link-button.danger,
#fahrtenbuch-training-groups-root .fb-link-button.danger,
#fahrtenbuch-regattas-root .fb-link-button.danger,
#fahrtenbuch-trainings-root .fb-link-button.danger {
	color: #b32d2e;
}

#fahrtenbuch-toern-form-root .fb-error,
#fahrtenbuch-dashboard-root .fb-error,
#fahrtenbuch-boat-manager-root .fb-error,
#fahrtenbuch-training-groups-root .fb-error,
#fahrtenbuch-persons-root .fb-error,
#fahrtenbuch-regattas-root .fb-error,
#fahrtenbuch-trainings-root .fb-error,
#fahrtenbuch-logbook-root .fb-error {
	background: #fdecea;
	border-left: 4px solid #d63638;
	padding: 8px 12px;
	margin-bottom: 12px;
}

#fahrtenbuch-toern-form-root .fb-notice,
#fahrtenbuch-dashboard-root .fb-notice,
#fahrtenbuch-boat-manager-root .fb-notice,
#fahrtenbuch-training-groups-root .fb-notice,
#fahrtenbuch-persons-root .fb-notice,
#fahrtenbuch-regattas-root .fb-notice,
#fahrtenbuch-trainings-root .fb-notice,
#fahrtenbuch-logbook-root .fb-notice {
	background: #edf5fb;
	border-left: 4px solid #2271b1;
	padding: 8px 12px;
	margin-bottom: 12px;
}

#fahrtenbuch-toern-form-root .fb-autocomplete,
#fahrtenbuch-boat-manager-root .fb-autocomplete,
#fahrtenbuch-training-groups-root .fb-autocomplete,
#fahrtenbuch-regattas-root .fb-autocomplete,
#fahrtenbuch-trainings-root .fb-autocomplete {
	position: relative;
	max-width: 320px;
}

#fahrtenbuch-toern-form-root .fb-autocomplete-results,
#fahrtenbuch-boat-manager-root .fb-autocomplete-results,
#fahrtenbuch-training-groups-root .fb-autocomplete-results,
#fahrtenbuch-regattas-root .fb-autocomplete-results,
#fahrtenbuch-trainings-root .fb-autocomplete-results {
	position: absolute;
	z-index: 10;
	background: #fff;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
	max-height: 200px;
	overflow-y: auto;
	width: 100%;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

#fahrtenbuch-toern-form-root .fb-autocomplete-results button,
#fahrtenbuch-boat-manager-root .fb-autocomplete-results button,
#fahrtenbuch-training-groups-root .fb-autocomplete-results button,
#fahrtenbuch-regattas-root .fb-autocomplete-results button,
#fahrtenbuch-trainings-root .fb-autocomplete-results button {
	display: block;
	width: 100%;
	text-align: left;
	background: #fff;
	color: #1d2327;
	border: none;
	border-bottom: 1px solid #f0f0f1;
}

#fahrtenbuch-toern-form-root .fb-autocomplete-results button:hover,
#fahrtenbuch-boat-manager-root .fb-autocomplete-results button:hover,
#fahrtenbuch-training-groups-root .fb-autocomplete-results button:hover,
#fahrtenbuch-regattas-root .fb-autocomplete-results button:hover,
#fahrtenbuch-trainings-root .fb-autocomplete-results button:hover {
	background: #f0f6fc;
}

.fb-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
}

.fb-badge.open {
	background: #edfaef;
	color: #1a7f37;
}

.fb-badge.closed {
	background: #fdecea;
	color: #a31624;
}

.fb-total-points {
	font-size: 22px;
	font-weight: 700;
	color: #2a78d6;
}

/* Farbakzente je Karte auf der Törnübersicht/Dashboard-Seite -- ein
   dezenter oberer Rahmen, keine Textfarbe (Werte bleiben in Textfarbe,
   siehe Diagramm-Regeln unten). */
#fahrtenbuch-dashboard-root .fb-card--accent-blue {
	border-top: 4px solid #2a78d6;
}

#fahrtenbuch-dashboard-root .fb-card--accent-green {
	border-top: 4px solid #008300;
}

#fahrtenbuch-dashboard-root .fb-card--accent-amber {
	border-top: 4px solid #eda100;
}

/* Balkendiagramm für Ranglisten: eine Farbe pro Diagramm (eine Kennzahl
   -- Punkte -- über mehrere Personen/Boote), Werte bleiben in Textfarbe. */
.fb-chart {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 4px 0 20px;
}

.fb-chart-row {
	display: grid;
	grid-template-columns: minmax(90px, 140px) 1fr auto;
	align-items: center;
	gap: 10px;
}

.fb-chart-label {
	font-size: 13px;
	color: #52514e;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.fb-chart-track {
	position: relative;
	height: 24px;
	display: flex;
	align-items: center;
}

.fb-chart-bar {
	height: 16px;
	border-radius: 4px;
	min-width: 6px;
	transition: filter 0.15s ease;
	outline-offset: 2px;
}

.fb-chart-bar:hover,
.fb-chart-bar:focus-visible {
	filter: brightness(1.1);
}

.fb-chart-track--blue {
	background: #cde2fb;
	border-radius: 4px;
}

.fb-chart-bar--blue {
	background: #2a78d6;
}

.fb-chart-track--green {
	background: rgba(0, 131, 0, 0.14);
	border-radius: 4px;
}

.fb-chart-bar--green {
	background: #008300;
}

.fb-chart-value {
	font-size: 13px;
	font-weight: 600;
	color: #1d2327;
	min-width: 48px;
	text-align: right;
	font-variant-numeric: tabular-nums;
}

.fahrtenbuch-wizard-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100000;
	padding: 20px;
}

.fahrtenbuch-wizard-modal {
	background: #fff;
	color: #1d2327;
	border-radius: 6px;
	padding: 24px 28px;
	max-width: 560px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.fahrtenbuch-wizard-modal h2 {
	margin-top: 0;
}

.fahrtenbuch-wizard-candidate {
	background: #f6f7f7;
	border-radius: 4px;
	padding: 12px 16px;
	margin: 16px 0;
}

.fahrtenbuch-wizard-candidate h3 {
	margin: 0 0 8px;
}

.fahrtenbuch-wizard-candidate ul {
	margin: 0 0 12px;
	padding-left: 20px;
}

.fahrtenbuch-wizard-modal button {
	font: inherit;
}

.fahrtenbuch-wizard-modal button.fb-secondary {
	background: transparent;
	color: inherit;
	border: 1px solid currentColor;
}

/* Törn-Massenimport: hebt Abschnitte mit noch offenen Fehlern oder
   ungelösten Boot-/Crew-Zuordnungen hervor. */
#fahrtenbuch-toern-form-root .fb-import-row--invalid {
	border-color: #d63638;
	border-width: 2px;
}

#fahrtenbuch-toern-form-root .fb-mapping {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px;
	margin-bottom: 6px;
}

#fahrtenbuch-toern-form-root .fb-mapping-raw {
	font-style: italic;
	color: #52514e;
	min-width: 140px;
}

#fahrtenbuch-toern-form-root .fb-mapping--blocking select {
	border-color: #d63638;
	background: #fdecea;
}

/* Kartenvorschau des GPX-Tracks beim Anlegen eines Törn-Abschnitts
   (Leaflet wird nur bei Bedarf lazy nachgeladen, siehe toern-form.js). */
#fahrtenbuch-toern-form-root .fb-gpx-map {
	height: 320px;
	margin-top: 10px;
	border: 1px solid #c3c4c7;
	border-radius: 4px;
}

/* Ein-/ausklappbare Feldauswahl für den .xlsx-Export von "Mein
   Fahrtenbuch" -- welche Spalten je Tabellenblatt (Törns/Regatten/
   Trainingseinheiten) mit exportiert werden. */
#fahrtenbuch-logbook-root .fb-export-settings {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	margin-top: 16px;
	padding-top: 16px;
	border-top: 1px solid #eee;
}

#fahrtenbuch-logbook-root .fb-export-field-group {
	min-width: 220px;
}

#fahrtenbuch-logbook-root .fb-export-field-list {
	display: flex;
	flex-direction: column;
	gap: 4px;
	margin-top: 8px;
}

#fahrtenbuch-logbook-root .fb-export-field-checkbox {
	display: flex;
	align-items: center;
	gap: 6px;
	font-weight: 400;
	font-size: 13px;
}

/* [fahrtenbuch_changelog]: rein serverseitig gerendertes Markup (kein
   React-Root), daher eigener, nicht auf die App-Root-IDs beschränkter
   Namespace. */
.fahrtenbuch-changelog {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	max-width: 720px;
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.fahrtenbuch-changelog-entry {
	background: #fff;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	padding: 4px 20px;
}

.fahrtenbuch-changelog-entry--current {
	border-color: #2a78d6;
	border-width: 2px;
}

.fahrtenbuch-changelog-entry summary {
	cursor: pointer;
	padding: 14px 0;
	font-weight: 600;
	font-size: 15px;
	list-style: revert;
}

.fahrtenbuch-changelog-version {
	margin-right: 10px;
}

.fahrtenbuch-changelog-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 11px;
	font-weight: 600;
	background: #edf5fb;
	color: #2271b1;
	vertical-align: middle;
}

.fahrtenbuch-changelog-entry ul {
	margin: 0 0 16px;
	padding-left: 22px;
}

.fahrtenbuch-changelog-entry li {
	margin-bottom: 6px;
	line-height: 1.5;
}

.fahrtenbuch-changelog-entry code {
	background: #f0f0f1;
	padding: 1px 5px;
	border-radius: 3px;
	font-size: 0.9em;
}
