/*
 * Natalia NCC - core block refinements on the Noir palette.
 */

/* Paragraph style "Tag": bordered label (NEW, payment methods) that never wraps. */
.wp-block-paragraph.is-style-tag,
p.is-style-tag {
	flex-shrink: 0;
	padding: 0.25rem 0.7rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary-strong) 40%, transparent);
	white-space: nowrap;
}

/* Mintchat WhatsApp button, "Outline" style: same look as the theme outline buttons. */
.wp-block-button > .wp-block-mintchat-chat-button.wp-element-button.is-style-outline {
	padding: 0.75rem 1.4rem;
	border: 1px solid color-mix(in srgb, var(--wp--preset--color--primary-strong) 45%, transparent);
	border-radius: 2px;
	background-color: transparent;
	color: var(--wp--preset--color--primary-strong);
	font-size: 0.75rem;
	font-weight: 400;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	white-space: nowrap;
}

.wp-block-button > .wp-block-mintchat-chat-button.wp-element-button.is-style-outline:hover {
	border-color: var(--wp--preset--color--primary);
	text-decoration: none;
}

/* Mintchat "Link" style: plain inline text link (footer contacts). */
.wp-block-button > .wp-block-mintchat-chat-button.wp-element-button.is-style-link {
	display: inline;
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font-size: inherit;
	font-weight: inherit;
	text-decoration: underline;
}

.wp-block-button > .wp-block-mintchat-chat-button.wp-element-button.is-style-link .mintchat-button__icon {
	display: none;
}

/* Payment method icons: inline SVG in the theme color; per-icon scale and radius come from
   data/payment-methods.json, the base sizes from theme.json (custom.payments). */
.nc-payment-icon {
	display: inline-flex;
	color: var(--wp--preset--color--primary-strong);
	opacity: 0.9;
}

.nc-payment-icon svg {
	width: auto;
	height: calc(var(--wp--custom--payments--icon-size) * var(--nc-icon-scale, 1));
	border-radius: var(--nc-icon-radius, 0);
}

@media (max-width: 600px) {
	.nc-payments {
		gap: var(--wp--custom--payments--gap-small) !important; /* overrides the generated layout container gap */
	}

	.nc-payment-icon svg {
		height: calc(var(--wp--custom--payments--icon-size-small) * var(--nc-icon-scale, 1));
	}
}

/* Footer logo mark: the monochrome logo as a mask, painted in the text color of the active style. */
.nc-logo-mark {
	display: block;
	width: var(--wp--custom--logo--footer-width);
	aspect-ratio: var(--wp--custom--logo--footer-ratio);
	background-color: var(--wp--preset--color--foreground);
	mask: url("../images/logo-van.png") center / contain no-repeat;
}

/* Header: Nelyqo's overlay header (transparent over the hero, fills while scrolling) in the site tones. */
.nelyqo-site-header {
	--nelyqo-header-fill: var(--wp--custom--color--header-fill);
}

.nc-header-bar {
	background: linear-gradient(to bottom, var(--wp--custom--color--header-shade), transparent);
}

/*
 * Zones (header, hero, footer): inside .nc-zone every palette color and the derived tokens come
 * from theme.json custom.zone. By default a zone repeats the page colors; a style variation can
 * give zones their own palette (e.g. a dark frame around a light page).
 */
.nc-zone {
	--wp--preset--color--background: var(--wp--custom--zone--background);
	--wp--preset--color--surface: var(--wp--custom--zone--surface);
	--wp--preset--color--surface-alt: var(--wp--custom--zone--surface-alt);
	--wp--preset--color--foreground: var(--wp--custom--zone--foreground);
	--wp--preset--color--foreground-muted: var(--wp--custom--zone--foreground-muted);
	--wp--preset--color--primary: var(--wp--custom--zone--primary);
	--wp--preset--color--primary-strong: var(--wp--custom--zone--primary-strong);
	--wp--preset--color--on-primary: var(--wp--custom--zone--on-primary);
	--wp--preset--color--accent: var(--wp--custom--zone--accent);
	--wp--preset--color--on-accent: var(--wp--custom--zone--on-accent);
	--wp--preset--color--line: var(--wp--custom--zone--line);
	--wp--preset--gradient--hero-scrim: var(--wp--custom--zone--scrim);
	--wp--custom--color--scheme: var(--wp--custom--zone--scheme);
	--wp--custom--color--shadow: var(--wp--custom--zone--shadow);
	--wp--custom--color--card: var(--wp--custom--zone--card);
	--wp--custom--color--card-border: var(--wp--custom--zone--card-border);
	--wp--custom--color--header-fill: var(--wp--custom--zone--header-fill);
	--wp--custom--color--header-shade: var(--wp--custom--zone--header-shade);
}

/* Quote card over the hero photo. */
.nc-quote-card {
	border-color: var(--wp--custom--color--card-border);
	background-color: var(--wp--custom--color--card);
}

/* Text inside inverted sections (background: foreground). */
.nc-inverse-accent {
	color: var(--wp--custom--color--inverse-accent);
}

.nc-inverse-muted {
	color: var(--wp--custom--color--inverse-muted);
}

/* The "Popular" tag in a scroll card keeps its own width (card children stretch by default). */
.wp-block-nelyqo-scroll-card .nelyqo-scroll-card__content > .is-style-tag {
	align-self: flex-start;
}

/*
 * A tag placed right before a heading shares its line: heading on the left, tag on the right,
 * both centered vertically. Works in any scroll card, front end and editor (block list layout).
 * shortcut: the grid drops the card's "buttons pushed to the bottom" (margin-top: auto); fine
 * while tagged cards have no buttons, switch to a wrapping group when one does.
 */
.nelyqo-scroll-card__content:has(> .is-style-tag + .wp-block-heading),
.nelyqo-scroll-card__content .block-editor-block-list__layout:has(> .is-style-tag + .wp-block-heading) {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	grid-auto-flow: row dense;
	align-content: start;
	column-gap: 1.25rem;
}

.nelyqo-scroll-card__content:has(> .is-style-tag + .wp-block-heading) > *,
.nelyqo-scroll-card__content .block-editor-block-list__layout:has(> .is-style-tag + .wp-block-heading) > * {
	grid-column: 1 / -1;
}

.nelyqo-scroll-card__content:has(> .is-style-tag + .wp-block-heading) > .is-style-tag:has(+ .wp-block-heading),
.nelyqo-scroll-card__content .block-editor-block-list__layout > .is-style-tag:has(+ .wp-block-heading) {
	grid-column: 2;
	align-self: center;
}

.nelyqo-scroll-card__content > .is-style-tag + .wp-block-heading,
.nelyqo-scroll-card__content .block-editor-block-list__layout > .is-style-tag + .wp-block-heading {
	grid-column: 1;
	align-self: center;
}

/* Itinerary rows are link targets (/excursions/#prosecco): keep them clear of the fixed header. */
.nc-itinerary {
	scroll-margin-top: 9rem;
}

/*
 * Phones: a Cover can have its own focal point ("Focus on phones" in the editor, set as
 * --nc-mobile-position by functions.php). !important because core writes the desktop one inline.
 *
 * Home hero: the stacked copy and quote card make the cover about 2000px tall, so the photo would
 * zoom in on its top. Keep it to the first screen and fade it into the zone background; without a
 * phone focal point it stays centered.
 */
@media (max-width: 599px) {
	.wp-block-cover.nc-has-mobile-focus > .wp-block-cover__image-background {
		object-position: var(--nc-mobile-position) !important;
	}

	.is-style-sticky-section > .wp-block-cover {
		background-color: var(--wp--preset--color--background);
	}

	.is-style-sticky-section > .wp-block-cover > .wp-block-cover__image-background {
		height: 100svh;
		object-position: var(--nc-mobile-position, 50% 50%) !important;
		mask-image: linear-gradient(#000 70%, transparent);
	}
}

@media (max-width: 599px) {
	.nelyqo-site-header .nc-header-bar {
		column-gap: 0.5rem;
	}

	/* Icon-only WhatsApp button so the hamburger has room; the label stays for screen readers. */
	.nc-header-bar .mintchat-button__label {
		position: absolute;
		width: 1px;
		height: 1px;
		overflow: hidden;
		clip-path: inset(50%);
		white-space: nowrap;
	}

	.nelyqo-site-header .wp-block-button__link {
		padding-inline: 0.8rem;
		letter-spacing: 0.08em;
	}
}

/* Language switcher (LangSail): codes in the header text color, the current one marked by its weight. */
.nc-lang a {
	color: inherit;
	text-decoration: none;
}

.nc-lang a:hover,
.nc-lang a:focus-visible {
	text-decoration: underline;
}

.nc-lang a:not([aria-current]) {
	opacity: 0.75;
}

/* Mobile: the switcher leaves the full header bar for its own thin row above it. */
@media (max-width: 599px) {
	.nelyqo-site-header .nc-header-bar {
		flex-wrap: wrap;
		row-gap: 0.5rem;
	}

	.nc-header-bar .nc-header-actions {
		display: contents;
	}

	.nc-header-actions .nc-lang {
		order: -1;
		flex-basis: 100%;
	}

	.nc-header-actions .nc-lang ul {
		justify-content: flex-end;
	}
}

/* Mobile menu overlay: Nelyqo's layout, in italic with a gold rule and close button. */
.nc-header-bar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container {
	border-top-color: color-mix(in srgb, var(--wp--preset--color--primary) 45%, transparent);
}

.nc-header-bar .wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item__content {
	font-style: italic;
}

.nc-header-bar .wp-block-navigation__responsive-container-close {
	color: var(--wp--preset--color--primary);
}

/* FAQ accordion: Nelyqo's plus-sign accordion with larger questions. */
.wp-block-details summary {
	font-size: clamp(1.25rem, 1.8vw, 1.5rem);
}

/* Airport rows (code, airport, "Request a quote"): on phones the code stays on the left and
   the airport name sits above its link, which keeps to one line. */
@media (max-width: 600px) {
	#airport-transfers .wp-block-group.is-nowrap {
		display: grid;
		grid-template-columns: 4.25rem 1fr;
		align-items: center;
		gap: 0.3rem 1rem;
	}

	#airport-transfers .wp-block-group.is-nowrap > :first-child {
		grid-row: span 2;
	}

	#airport-transfers .wp-block-group.is-nowrap > * {
		margin: 0;
	}

	#airport-transfers .wp-block-group.is-nowrap > :last-child {
		white-space: nowrap;
	}
}

/* Step numbers keep their width when a translation makes the step text longer. */
.nc-step-number {
	flex-shrink: 0;
}
