/**
 * Scoped styling for remote Drupal/Views job markup (yachtoffice embed).
 * Layout is informed by the DOM (.views-row, .views-field, .views-label, .field-content)
 * but uses a modern grid — not a pixel copy of legacy theme CSS.
 *
 * Override tokens on .sfx-yachtoffice-embed (theme / Customizer).
 */

.sfx-yachtoffice-embed {
	/* Tokens */
	--sfx-yo-font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--sfx-yo-text: #1e293b;
	--sfx-yo-muted: #64748b;
	--sfx-yo-border: #e2e8f0;
	--sfx-yo-border-strong: #cbd5e1;
	--sfx-yo-surface: #ffffff;
	--sfx-yo-surface-subtle: #f8fafc;
	--sfx-yo-accent: #0069b3;
	--sfx-yo-radius: 12px;
	--sfx-yo-shadow: 0 1px 3px rgb(15 23 42 / 8%);
	--sfx-yo-space: 1.25rem;
	--sfx-yo-space-sm: 0.75rem;
	--sfx-yo-label-col: minmax(10rem, 13rem);
	--sfx-yo-max-text: 70ch;

	box-sizing: border-box;
	font-family: var(--sfx-yo-font);
	font-size: 1rem;
	color: var(--sfx-yo-text);
	line-height: 1.6;
	margin: var(--sfx-yo-space) 0;
}

.sfx-yachtoffice-embed *,
.sfx-yachtoffice-embed *::before,
.sfx-yachtoffice-embed *::after {
	box-sizing: inherit;
}

.sfx-yachtoffice-embed .panel-pane,
.sfx-yachtoffice-embed .view {
	margin: 0;
	padding: 0;
	background: transparent;
	border: 0;
	box-shadow: none;
}

/* List shell */
.sfx-yachtoffice-embed .item-list ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.sfx-yachtoffice-embed .view-content li {
	list-style: none;
	border: 0;
}

/* One job = one card */
.sfx-yachtoffice-embed .views-row {
	display: flow-root;
	background: var(--sfx-yo-surface);
	border: 1px solid var(--sfx-yo-border);
	border-radius: var(--sfx-yo-radius);
	padding: var(--sfx-yo-space);
	margin-bottom: var(--sfx-yo-space);
	box-shadow: var(--sfx-yo-shadow);
}

.sfx-yachtoffice-embed .views-row:last-child {
	margin-bottom: 0;
}

/* Label + value rows (no floats) */
.sfx-yachtoffice-embed .views-field:not(.views-field-field-anzeigentext):not(.sfx-yo-job-title-row) {
	display: grid;
	grid-template-columns: var(--sfx-yo-label-col) 1fr;
	gap: 0.35rem 1rem;
	align-items: baseline;
	margin: 0 0 var(--sfx-yo-space-sm);
}

.sfx-yachtoffice-embed .views-field:not(.views-field-field-anzeigentext):not(.sfx-yo-job-title-row):last-child {
	margin-bottom: 0;
}

.sfx-yachtoffice-embed .views-field.sfx-yo-job-title-row {
	margin: 0 0 var(--sfx-yo-space-sm);
}

.sfx-yachtoffice-embed .sfx-yo-job-title {
	margin: 0;
	font-size: clamp(1.15rem, 2.5vw, 1.35rem);
	font-weight: 600;
	line-height: 1.35;
	color: var(--sfx-yo-text);
	letter-spacing: -0.01em;
}

.sfx-yachtoffice-embed .views-label {
	float: none;
	margin: 0;
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--sfx-yo-muted);
	line-height: 1.4;
}

.sfx-yachtoffice-embed .views-field:not(.views-field-field-anzeigentext) .field-content {
	float: none;
	margin: 0;
	font-size: 0.9375rem;
	color: var(--sfx-yo-text);
	word-break: break-word;
}

/* Long description: full width under meta */
.sfx-yachtoffice-embed .views-field-field-anzeigentext {
	display: block;
	margin: var(--sfx-yo-space-sm) 0 0;
	padding: var(--sfx-yo-space-sm) 0 0;
	border-top: 1px solid var(--sfx-yo-border);
	clear: both;
}

.sfx-yachtoffice-embed .views-field-field-anzeigentext::before {
	content: none;
}

.sfx-yachtoffice-embed .views-field-field-anzeigentext .field-content {
	float: none;
	display: block;
	margin: 0;
	padding: 0;
	max-width: var(--sfx-yo-max-text);
	font-size: 0.9375rem;
	color: var(--sfx-yo-text);
}

.sfx-yachtoffice-embed .views-field::after {
	content: none;
	display: none;
}

.sfx-yachtoffice-embed a {
	color: var(--sfx-yo-accent);
	font-weight: 500;
	text-decoration-thickness: 1px;
	text-underline-offset: 0.15em;
}

.sfx-yachtoffice-embed a:hover {
	text-decoration: underline;
}

/* Narrow screens: stack label above value */
@media (max-width: 36rem) {
	.sfx-yachtoffice-embed .views-field:not(.views-field-field-anzeigentext):not(.sfx-yo-job-title-row) {
		grid-template-columns: 1fr;
		gap: 0.15rem;
	}
}
