/**
 * Meal Add-On — booking modal tab styles.
 * Flexbox + media queries native to the WP Travel Engine ecosystem.
 */

.wpte-meal-tab {
	display: flex;
	flex-direction: column;
	gap: 16px;
	-webkit-font-smoothing: antialiased;
	font-variant-numeric: tabular-nums;
}

.wpte-meal-tab-title {
	margin: 0;
	font-size: 18px;
	font-weight: 700;
	color: #0f1d23;
}

.wpte-meal-tab-description {
	margin: 0;
	font-size: 14px;
	color: #566267;
	line-height: 1.6;
}

.wpte-general-meal-disclaimer {
	margin: 0;
	font-size: 13px;
	color: #8a6d1f;
	background: rgba( 234, 179, 8, 0.1 );
	border: 1px solid rgba( 234, 179, 8, 0.3 );
	border-radius: 8px;
	padding: 10px 12px;
}

.wpte-meal-empty {
	color: #566267;
	font-size: 14px;
}

/* -----------------------------------------------------------------
 * Arrival/Departure Time gating substep. Stays mounted (never
 * removed) once answered — see MealsTab's `gateElement` in
 * public.js — toggling instead between the expanded (`__body`) and
 * collapsed (`--collapsed`) states below.
 * --------------------------------------------------------------- */
.wpte-meal-gate {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	background: #f7f9fa;
	border-radius: 10px;
}

.wpte-meal-gate__body {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.wpte-meal-gate__radios {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	gap: 24px;
}

.wpte-meal-gate__radios .wpte-meal-radio-group {
	flex: 1 1 200px;
}

.wpte-meal-gate__collapse {
	align-self: flex-end;
	background: none;
	border: none;
	padding: 0;
	font-size: 12px;
	font-weight: 700;
	color: #0f1d23;
	text-decoration: underline;
	cursor: pointer;
}

@media ( max-width: 480px ) {
	.wpte-meal-gate__radios {
		gap: 16px;
	}
}

/* Collapsed state — the answered summary row, click/tap (or Enter/Space
   while focused) to reopen `__body` and change the response. */
.wpte-meal-gate--collapsed {
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 12px 16px;
	cursor: pointer;
}

.wpte-meal-gate__summary {
	display: flex;
	flex-wrap: wrap;
	column-gap: 16px;
	row-gap: 4px;
	font-size: 13px;
	font-weight: 600;
	color: #1a2b33;
}

.wpte-meal-gate__summary-item {
	white-space: nowrap;
}

.wpte-meal-gate__change {
	flex-shrink: 0;
	background: none;
	border: 1px solid #dfe4e7;
	border-radius: 6px;
	padding: 6px 12px;
	font-size: 12px;
	font-weight: 600;
	color: #0f1d23;
	background-color: #ffffff;
	cursor: pointer;
}

.wpte-meal-gate__change:hover {
	background-color: #eef1f2;
}

.wpte-meal-radio-group {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wpte-meal-radio-group__label {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 13px;
	font-weight: 700;
	color: #1a2b33;
}

.wpte-meal-radio-group__required {
	display: inline-flex;
	align-items: center;
	min-height: 20px;
	padding: 2px 8px;
	border-radius: 999px;
	background: rgba( 220, 38, 38, 0.08 );
	color: #b91c1c;
	font-size: 11px;
	font-weight: 700;
	line-height: 1.2;
}

.wpte-meal-radio-group__options {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

.wpte-meal-radio-option {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 13px;
	color: #1a2b33;
	cursor: pointer;
}

.wpte-meal-radio-group__empty {
	width: 100%;
	margin: 0;
	padding: 12px;
	color: #991b1b;
	background: #fff5f5;
	border: 1px dashed #f0b4b4;
	border-radius: 8px;
	font-size: 13px;
	line-height: 1.45;
}

.wpte-meal-radio-disclaimer {
	margin: 0;
	font-size: 12px;
	color: #566267;
	font-style: italic;
}

.wpte-meal-placeholder {
	margin: 0;
	padding: 20px;
	text-align: center;
	font-size: 14px;
	color: #566267;
	background: #ffffff;
	border: 1px dashed #dfe4e7;
	border-radius: 8px;
}

.wpte-meal-status {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 14px 16px;
	border-radius: 8px;
	font-size: 14px;
	line-height: 1.45;
}

.wpte-meal-status--loading {
	color: #566267;
	background: #f7f9fa;
	border: 1px solid #dfe4e7;
}

.wpte-meal-status--loading::before {
	content: '';
	width: 14px;
	height: 14px;
	flex: 0 0 14px;
	border-radius: 50%;
	border: 2px solid #cdd6da;
	border-top-color: #29ad57;
	animation: wpte-meal-spin 0.8s linear infinite;
}

.wpte-meal-status--error {
	color: #991b1b;
	background: #fff5f5;
	border: 1px solid #f0b4b4;
}

.wpte-meal-status--warning {
	color: #8a5a16;
	background: #fff8e6;
	border: 1px solid #f2d48c;
}

.wpte-meal-status--transient {
	animation: wpte-meal-warning-fade 3.6s ease forwards;
}

@keyframes wpte-meal-spin {
	to {
		transform: rotate( 360deg );
	}
}

@keyframes wpte-meal-warning-fade {
	0%,
	72% {
		opacity: 1;
	}
	100% {
		opacity: 0;
	}
}

/* -----------------------------------------------------------------
 * Meal cards.
 * --------------------------------------------------------------- */
.wpte-meal-list {
	display: flex;
	flex-direction: row;
	gap: 16px;
	margin-bottom: 20px;
}

@media (max-width: 549px) {
	.wpte-meal-list {
		flex-direction: column;
	}
}

.wpte-meal-card {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 16px;
	border-radius: 10px;
	cursor: pointer;
	user-select: none;
	box-shadow:
		0px 0px 0px 1px rgba( 0, 0, 0, 0.06 ),
		0px 1px 2px -1px rgba( 0, 0, 0, 0.06 ),
		0px 2px 4px 0px rgba( 0, 0, 0, 0.04 );
	transition-property: box-shadow, background-color, scale;
	transition-duration: 0.2s;
	transition-timing-function: ease-out;
}

.wpte-meal-card:hover {
	box-shadow:
		0px 0px 0px 1px rgba( 41, 173, 87, 0.35 ),
		0px 4px 14px rgba( 26, 43, 51, 0.08 );
}

.wpte-meal-card:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba( 41, 173, 87, 0.25 );
}

.wpte-meal-card:active {
	scale: 0.96;
}

.wpte-meal-card.is-selected {
	box-shadow: 0 0 0 2px #29ad57;
	background: rgb( 41 173 87 / .08 );
}

.wpte-meal-card.is-no-meal .wpte-meal-types {
	color: #566267;
}

.wpte-meal-card__day {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 2;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	color: #ffffff;
	background: #1a2b33;
	border-radius: 999px;
	box-shadow: 0 2px 6px rgba( 26, 43, 51, 0.18 );
}

/* Round checkbox↔checkmark badge, always rendered — an empty outlined circle
   at rest, morphing smoothly into the filled green checkmark via CSS
   transition when `.is-checked` is toggled. Pinned top-right. */
.wpte-meal-checkmark {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 2;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 22px;
	height: 22px;
	background: transparent;
	border: 2px solid #c7d0d4;
	border-radius: 50%;
	box-shadow: none;
	transition: background-color 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.wpte-meal-checkmark.is-checked {
	background: #29ad57;
	border-color: #29ad57;
	box-shadow: 0 2px 6px rgba( 22, 101, 52, 0.25 );
}

.wpte-meal-checkmark::after {
	content: '';
	width: 10px;
	height: 10px;
	background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 13 9.5 18.5 20 6'/%3E%3C/svg%3E" );
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	opacity: 0;
	scale: 0.5;
	transition: opacity 0.2s ease, scale 0.2s cubic-bezier( 0.2, 0, 0, 1 );
}

.wpte-meal-checkmark.is-checked::after {
	opacity: 1;
	scale: 1;
}

.wpte-meal-head {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding-right: 32px;
	min-height: 28px;
}

.wpte-meal-card.wagyu .wpte-meal-head {
	padding-top: 30px;
}

.wpte-meal-recommended {
	display: inline-flex;
	align-self: flex-start;
	padding: 3px 10px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.02em;
	text-transform: uppercase;
	color: #ffffff;
	background: #16a34a;
	border-radius: 999px;
	box-shadow: 0 2px 6px rgba( 22, 101, 52, 0.25 );
}

.wpte-meal-title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	line-height: 1.3;
	color: #0f1d23;
	text-wrap: balance;
}

.wpte-meal-types {
	font-size: 13px;
	font-weight: 600;
	color: #29ad57;
}

.wpte-meal-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wpte-meal-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 11px;
	font-size: 12px;
	color: #29ad57;
	background-color: rgba( 41, 173, 87, 0.08 );
	border-radius: 50px;
}

.wpte-meal-badge__icon {
	display: inline-flex;
	align-items: center;
}

/* Wagyu "multiple days" day-picker. */
.wpte-meal-day-pick {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.wpte-meal-day-pick__label {
	font-size: 12px;
	font-weight: 600;
	color: #566267;
}

.wpte-meal-day-pills {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.wpte-meal-day-pill {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 32px;
	padding: 6px 14px;
	font-size: 12px;
	font-weight: 600;
	color: #566267;
	background: #f7f9fa;
	border: 1px solid #e6eaec;
	border-radius: 999px;
	cursor: pointer;
	transition-property: border-color, background-color, color, scale;
	transition-duration: 0.2s;
	transition-timing-function: ease-out;
}

.wpte-meal-day-pill:hover {
	border-color: #29ad57;
}

.wpte-meal-day-pill:active {
	scale: 0.96;
}

.wpte-meal-day-pill.is-active {
	color: #29ad57;
	background: rgba( 41, 173, 87, 0.12 );
	border-color: #29ad57;
}

.wpte-meal-gallery {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
}

.wpte-meal-gallery__item {
	display: block;
	width: calc( 25% - 5px );
	height: 72px;
	border-radius: 6px;
	overflow: hidden;
	cursor: zoom-in;
	outline: 1px solid rgba( 0, 0, 0, 0.1 );
	outline-offset: -1px;
}

.wpte-meal-gallery__item img {
	width: 100%;
	height: 72px;
	object-fit: cover;
	border-radius: 6px;
	transition: transform 0.25s ease;
}

.wpte-meal-gallery__item:hover img {
	transform: scale( 1.05 );
}

.wpte-meal-desc {
	position: relative;
	font-size: 14px;
	line-height: 1.6;
	color: #566267;
	max-height: 4.8em;
	overflow: hidden;
	transition: max-height 0.35s ease;
	text-wrap: pretty;
}

.wpte-meal-desc p {
	margin: 0;
}

.wpte-meal-desc ul li {
	margin: 0 0 0 1.2em;
}

.wpte-meal-desc.is-expanded {
	max-height: 200em;
}

.wpte-meal-desc:not( .is-expanded )::after {
	content: '';
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	height: 2em;
	background: linear-gradient( rgba( 255, 255, 255, 0 ), #fff );
	pointer-events: none;
}

.wpte-meal-readmore {
	align-self: flex-start;
	padding: 0;
	font-size: 13px;
	font-weight: 600;
	color: #29ad57;
	background: none;
	border: 0;
	cursor: pointer;
}

.wpte-meal-readmore:hover {
	text-decoration: underline;
}

.wpte-infant-meal-disclaimer {
	margin: 0;
	font-size: 12px;
	color: #8a6d1f;
	font-style: italic;
}

.wpte-meal-breakdown {
	padding: 12px;
	border-radius: 8px;
}

.wpte-meal-breakdown__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: 13px;
	font-weight: 600;
	color: #1a2b33;
	cursor: pointer;
	user-select: none;
	min-height: 40px;
}

.wpte-meal-breakdown__head:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba( 41, 173, 87, 0.25 );
	border-radius: 4px;
}

.wpte-meal-chevron {
	transition: transform 0.2s ease;
	color: #566267;
}

.wpte-meal-chevron.is-open {
	transform: rotate( 180deg );
}

.wpte-meal-breakdown__rows-wrapper {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	transition: grid-template-rows 250ms ease, visibility 0s linear 250ms;
}

.wpte-meal-breakdown.is-open .wpte-meal-breakdown__rows-wrapper {
	grid-template-rows: 1fr;
	visibility: visible;
	transition: grid-template-rows 250ms ease, visibility 0s linear 0s;
}

.wpte-meal-breakdown__rows {
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 10px;
	overflow: hidden;
	min-height: 0;
}

.wpte-meal-line {
	display: flex;
	justify-content: space-between;
	font-size: 13px;
	color: #566267;
}

.wpte-meal-line--total {
	margin-top: 4px;
	padding-top: 8px;
	border-top: 1px solid #e1e6e8;
	font-weight: 600;
	color: #1a2b33;
}

@media ( max-width: 600px ) {
	.wpte-meal-gallery__item {
		width: calc( 50% - 3px );
	}
}

/* Sidebar summary (rendered into #wte-booking-es-summary-content or
   .wte-booking-trip-info — see writeSidebarContent() in public.js). */
.wpte-meal-summary {
	margin-top: 16px;
}

.wpte-meal-summary ul {
	list-style: none;
	margin: 0;
	padding: 0;
}

.wpte-meal-summary__item {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	padding-top: 8px;
	border-top: 1px dashed #e1e6e8;
	margin-top: 6px;
}

.wpte-meal-summary__item:first-child {
	border-top: 0;
	margin-top: 0;
	padding-top: 0;
}

.wpte-meal-summary__item > label {
	flex: 1;
	font-size: 13px;
	line-height: 1.35;
	color: #1a2b33;
}

.wpte-meal-summary__item .amount-figure {
	font-variant-numeric: tabular-nums;
}

.wpte-meal-summary__line {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 8px;
	padding: 2px 0 2px 12px;
}

.wpte-meal-summary__line > label {
	flex: 1;
}

.wpte-meal-summary__line .qty {
	font-size: 12px;
	color: #566267;
}

.wpte-meal-summary__line .amount-figure {
	font-size: 12px;
	color: #566267;
	font-variant-numeric: tabular-nums;
	white-space: nowrap;
}

/**
 * WPTE trip booking modal — step nav polish (finished-step checkmark, muted
 * finished underline, clearer active-step focus, step-number badges).
 * Shipped identically in all four addon plugins — see the sibling plugins'
 * identical block for the full rationale.
 */
.wte-process-nav-list .wte-process-nav-item.finish {
	position: relative;
}

.wte-process-nav-list .wte-process-nav-item.finish::after {
	content: '';
	position: absolute;
	top: 6px;
	right: 10px;
	width: 18px;
	height: 18px;
	background-color: #29ad57;
	background-image: url( "data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='4 13 9.5 18.5 20 6'/%3E%3C/svg%3E" );
	background-size: 10px 10px;
	background-repeat: no-repeat;
	background-position: center;
	border-radius: 50%;
	box-shadow: 0 2px 6px rgba( 22, 101, 52, 0.25 );
}

.wte-process-nav-list {
	counter-reset: wpte-step;
}

.wte-process-nav-list .wte-process-nav-item {
	counter-increment: wpte-step;
}

.wte-process-nav-list .wte-process-nav-item:not(.finish)::before {
	content: counter( wpte-step );
	position: absolute;
	top: 6px;
	left: 10px;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #e9edf0;
	color: #6e797e;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 11px;
	font-weight: 700;
}

.wte-process-nav-list .wte-process-nav-item.finish {
	border-bottom-color: rgba( 41, 173, 87, 0.35 ) !important;
}

.wte-process-nav-list .wte-process-nav-item.finish {
	border-bottom-color: color-mix( in srgb, var( --wpte-primary-color, var( --primary-color ) ) 35%, transparent ) !important;
}

.wte-process-nav-list .wte-process-nav-item.active {
	border-bottom-color: var( --wpte-primary-color, var( --primary-color ) ) !important;
	background-color: rgba( 41, 173, 87, 0.08 );
	background-color: color-mix( in srgb, var( --wpte-primary-color, var( --primary-color ) ) 8%, transparent );
	border-radius: 8px 8px 0 0;
}

.wte-process-nav-list .wte-process-nav-item.active a {
	font-weight: 700;
}

/* Admin-uploaded custom tab icon: size it exactly like WPTE's own native
   `.wte-icon svg { width:1em; height:1em }` rule — see the sibling plugins'
   identical rule for the full rationale. */
.wte-icon .wpte-tab-icon-img {
	width: 1em;
	height: 1em;
	object-fit: contain;
	flex-shrink: 0;
	display: block;
}
