/**
 * ExpertFlyer Cruncher — Stitch layout.
 *
 * @package Ikvliegveel
 */

:root {
	--ivv-ef-primary: #004fa8;
	--ivv-ef-primary-container: #0066d6;
	--ivv-ef-surface: #f8f9ff;
	--ivv-ef-surface-low: #eff4ff;
	--ivv-ef-surface-container: #e5eeff;
	--ivv-ef-on-surface: #0b1c30;
	--ivv-ef-on-surface-variant: #424753;
	--ivv-ef-outline-variant: #c2c6d6;
	--ivv-ef-secondary-container: #dae2fd;
}

body.ivv-expertflyer-page,
body.ivv-expertflyer-page .site-main {
	background: var(--ivv-ef-surface);
}

body.ivv-expertflyer-page #main-container > main > .hero-section,
body.ivv-expertflyer-page #main-container > main > header.hero-section,
body.ivv-expertflyer-page #main-container > main > [class*='page-title'] {
	display: none !important;
}

.ivv-ef-page .material-symbols-outlined {
	font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
	vertical-align: middle;
}

.ivv-ef-page__inner {
	max-width: 80rem;
	padding-top: 2rem;
	padding-bottom: 4rem;
}

@media (min-width: 992px) {
	body.ivv-expertflyer-page .ivv-ef-page__content {
		flex: 0 0 66.666%;
		max-width: 66.666%;
	}

	body.ivv-expertflyer-page .ivv-ef-page__sidebar {
		flex: 0 0 33.333%;
		max-width: 33.333%;
	}
}

.ivv-ef-page__content {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

/* Hero */
.ivv-ef-hero__eyebrow {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.5rem;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--ivv-ef-primary);
}

.ivv-ef-hero__eyebrow .material-symbols-outlined {
	font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.ivv-ef-hero__title {
	margin: 0 0 0.75rem;
	font-size: clamp(1.75rem, 4vw, 2rem);
	font-weight: 800;
	line-height: 1.2;
	color: var(--ivv-ef-on-surface);
}

.ivv-ef-hero__intro {
	margin: 0;
	max-width: 42rem;
	font-size: 1rem;
	line-height: 1.6;
	color: var(--ivv-ef-on-surface-variant);
}

/* Cards */
.ivv-ef-card {
	background: #fff;
	border: 1px solid var(--ivv-ef-outline-variant);
	border-radius: 0.75rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
}

.ivv-ef-card--input {
	position: relative;
	overflow: hidden;
}

.ivv-ef-card--input::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 4px;
	height: 100%;
	background: var(--ivv-ef-primary);
}

.ivv-ef-card--help {
	padding: 1.5rem;
}

.ivv-ef-card__title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--ivv-ef-on-surface);
}

/* Form */
.ivv-ef-form {
	padding: 1.5rem 1.5rem 1.5rem 1.75rem;
}

.ivv-ef-form__title {
	margin: 0;
	font-size: 1rem;
	font-weight: 600;
	color: var(--ivv-ef-on-surface);
}

.ivv-ef-form__hint {
	margin: 0.25rem 0 0;
	font-size: 0.75rem;
	color: var(--ivv-ef-on-surface-variant);
}

.ivv-ef-form__textarea {
	box-sizing: border-box;
	width: 100%;
	min-height: 12rem;
	margin-top: 1rem;
	padding: 1rem;
	font-family: inherit;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--ivv-ef-on-surface);
	background: var(--ivv-ef-surface);
	border: 1px solid var(--ivv-ef-outline-variant);
	border-radius: 0.5rem;
	resize: vertical;
	outline: none;
	transition: box-shadow 0.2s, border-color 0.2s;
}

.ivv-ef-form__textarea:focus {
	border-color: var(--ivv-ef-primary);
	box-shadow: 0 0 0 2px rgba(0, 79, 168, 0.2);
}

.ivv-ef-form__footer {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 1rem;
	padding-top: 0.75rem;
}

@media (min-width: 768px) {
	.ivv-ef-form__footer {
		flex-direction: row;
		align-items: flex-end;
		justify-content: space-between;
	}
}

.ivv-ef-strategy__label {
	display: block;
	margin-bottom: 0.5rem;
	font-size: 1rem;
	font-weight: 600;
	color: var(--ivv-ef-on-surface);
}

.ivv-ef-strategy__toggle {
	display: inline-flex;
	padding: 0.25rem;
	background: var(--ivv-ef-surface-container);
	border: 1px solid var(--ivv-ef-outline-variant);
	border-radius: 9999px;
}

.ivv-ef-strategy__option {
	margin: 0;
	cursor: pointer;
}

.ivv-ef-strategy__option input {
	position: absolute;
	width: 1px;
	height: 1px;
	margin: -1px;
	padding: 0;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.ivv-ef-strategy__option span {
	display: block;
	padding: 0.5rem 1.25rem;
	font-size: 0.75rem;
	font-weight: 500;
	color: var(--ivv-ef-on-surface-variant);
	border-radius: 9999px;
	transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.ivv-ef-strategy__option.is-active span,
.ivv-ef-strategy__option input:checked + span {
	background: var(--ivv-ef-primary);
	color: #fff;
	box-shadow: 0 1px 3px rgba(0, 79, 168, 0.25);
}

.ivv-ef-form__submit {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.875rem 1.75rem;
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	color: #fff;
	background: var(--ivv-ef-primary);
	border: 0;
	border-radius: 0.5rem;
	box-shadow: 0 4px 12px rgba(0, 79, 168, 0.25);
	cursor: pointer;
	transition: background 0.2s, transform 0.15s;
}

.ivv-ef-form__submit:hover {
	background: var(--ivv-ef-primary-container);
}

.ivv-ef-form__submit:active {
	transform: scale(0.98);
}

/* Help steps */
.ivv-ef-help__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

@media (min-width: 768px) {
	.ivv-ef-help__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

.ivv-ef-help__step p {
	margin: 0 0 1rem;
	font-size: 0.875rem;
	line-height: 1.5;
	color: var(--ivv-ef-on-surface-variant);
}

.ivv-ef-help__step img {
	display: block;
	width: 100%;
	height: auto;
	border: 1px solid var(--ivv-ef-outline-variant);
	border-radius: 0.5rem;
}

.ivv-ef-help__step-head {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.75rem;
}

.ivv-ef-help__step-head h3 {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--ivv-ef-on-surface);
}

.ivv-ef-help__num {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 2rem;
	height: 2rem;
	font-size: 0.75rem;
	font-weight: 700;
	color: #fff;
	background: var(--ivv-ef-primary);
	border-radius: 9999px;
}

/* Output / results */
.ivv-ef-output {
	min-height: 0;
}

.ivv-ef-output.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.ivv-ef-results {
	margin-top: 0.25rem;
	background: #fff;
	border: 1px solid var(--ivv-ef-outline-variant);
	border-radius: 0.75rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

.ivv-ef-results__head {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 1rem 1.25rem;
	background: var(--ivv-ef-surface-low);
	border-bottom: 1px solid var(--ivv-ef-outline-variant);
}

.ivv-ef-results__head-title {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.ivv-ef-results__head-title h3 {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--ivv-ef-on-surface);
}

.ivv-ef-results__count {
	padding: 0.25rem 0.625rem;
	font-size: 0.6875rem;
	font-weight: 600;
	color: var(--ivv-ef-on-surface-variant);
	background: var(--ivv-ef-surface-container);
	border-radius: 0.25rem;
}

.ivv-ef-results__empty {
	margin: 0;
	padding: 1.25rem;
	font-size: 0.875rem;
	color: var(--ivv-ef-on-surface-variant);
}

.ivv-ef-results__table-wrap {
	overflow-x: auto;
}

.ivv-ef-results__table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.875rem;
}

.ivv-ef-results__table thead {
	background: var(--ivv-ef-surface-low);
	border-bottom: 1px solid var(--ivv-ef-outline-variant);
}

.ivv-ef-results__table th {
	padding: 1rem 1.25rem;
	font-size: 0.6875rem;
	font-weight: 600;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	text-align: left;
	color: var(--ivv-ef-on-surface-variant);
	white-space: nowrap;
}

.ivv-ef-results__route-row td {
	padding: 0.75rem 1.25rem;
	background: rgba(239, 244, 255, 0.7);
	border-top: 1px solid var(--ivv-ef-outline-variant);
}

.ivv-ef-results__route-label {
	font-size: 0.9375rem;
	font-weight: 700;
	color: var(--ivv-ef-on-surface);
}

.ivv-ef-results__deal-badge {
	display: inline-block;
	margin-left: 0.5rem;
	padding: 0.125rem 0.375rem;
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	color: #fff;
	background: var(--ivv-ef-primary-container);
	border-radius: 0.25rem;
	vertical-align: middle;
}

.ivv-ef-results__data-row td {
	padding: 1rem 1.25rem;
	border-bottom: 1px solid rgba(194, 198, 214, 0.35);
}

.ivv-ef-results__data-row:hover {
	background: var(--ivv-ef-surface-low);
}

.ivv-ef-results__row-label {
	font-size: 0.75rem;
	font-weight: 600;
	text-transform: uppercase;
	color: var(--ivv-ef-on-surface-variant);
}

.ivv-ef-results__cell--highlight {
	font-weight: 700;
	color: var(--ivv-ef-primary);
}

/* Sidebar */
body.ivv-expertflyer-page .ivv-ef-page__sidebar {
	display: flex;
	flex-direction: column;
	gap: var(--ivv-sidebar-widget-gap, 10px);
}

body.ivv-expertflyer-page .ivv-ef-page__sidebar > .widget,
body.ivv-expertflyer-page .ivv-ef-page__sidebar > section.widget {
	margin: 0 !important;
	width: 100%;
}

/* Hide legacy calculator output styles inside EF page */
body.ivv-expertflyer-page .CalculatorOutput,
body.ivv-expertflyer-page .calculatorOutputHeader,
body.ivv-expertflyer-page #tableCalculatorOutput {
	display: none;
}

/* Breadcrumbs */
.ivv-ef-breadcrumb {
	margin: 0 0 0.25rem;
}

.ivv-ef-breadcrumb__list {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.25rem 0.5rem;
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: 0.8125rem;
}

.ivv-ef-breadcrumb__link {
	color: var(--ivv-ef-primary);
	text-decoration: none;
}

.ivv-ef-breadcrumb__link:hover {
	text-decoration: underline;
}

.ivv-ef-breadcrumb__current {
	color: var(--ivv-ef-on-surface-variant);
	font-weight: 600;
}

.ivv-ef-breadcrumb__sep {
	display: flex;
	align-items: center;
	color: var(--ivv-ef-outline-variant);
}

.ivv-ef-breadcrumb__sep .material-symbols-outlined {
	font-size: 1rem;
}

/* FAQ */
.ivv-ef-faq__list {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.ivv-ef-faq__item {
	border: 1px solid var(--ivv-ef-outline-variant);
	border-radius: 0.5rem;
	overflow: hidden;
	background: var(--ivv-ef-surface);
}

.ivv-ef-faq__question {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 0.75rem;
	padding: 0.875rem 1rem;
	font-size: 0.9375rem;
	font-weight: 600;
	color: var(--ivv-ef-on-surface);
	cursor: pointer;
	list-style: none;
}

.ivv-ef-faq__question::-webkit-details-marker {
	display: none;
}

.ivv-ef-faq__answer {
	padding: 0 1rem 1rem;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--ivv-ef-on-surface-variant);
}

.ivv-ef-faq__answer p {
	margin: 0;
}

.ivv-ef-faq__icon {
	flex-shrink: 0;
	color: var(--ivv-ef-primary);
	transition: transform 0.2s;
}

.ivv-ef-faq__item[open] .ivv-ef-faq__icon {
	transform: rotate(180deg);
}
