/*
 * Mobile polish (2026-12-05, after the launch review on phones).
 * Plain CSS, no build: loaded after site.css from inc/register-scripts.php.
 * Each block names the page and the problem it fixes.
 */

/* 1. CF7 forms (/kontakti/): Turnstile.
 * inc/turnstile.php moves CF7's widget right before the submit button and makes
 * it interaction-only, so it is usually 0px high. The form is a flex column with
 * a 32px gap: the negative margins cancel the extra gap of the empty item, and
 * leave 16px above and below the widget when Cloudflare does show it. */
.wpcf7-form > .wpcf7-turnstile {
	margin-block: -16px;
}

/* 2. Cookie banner (Complianz).
 * The accept button: dark text on the brand yellow, like every yellow button on
 * the site (Complianz's own setting had white text, unreadable). Set here, not in
 * the Complianz colour settings, so it is versioned and needs no DB change. */
.cmplz-cookiebanner {
	--cmplz_button_accept_text_color: var(--wp--preset--color--primary);
	--cmplz_button_accept_background_color: var(--wp--preset--color--secondary);
	--cmplz_button_accept_border_color: var(--wp--preset--color--secondary);
	--cmplz_text_color: var(--wp--preset--color--primary);
}

@media (max-width: 768px) {
	/* Phones: one compact strip. Text, then „Приемам“ as the button with
	 * „Отказвам“ as an inline text link beside it (Alek, 2026-12-05). */
	.cmplz-cookiebanner.cmplz-cookiebanner {
		padding: 14px 16px 10px;
		grid-gap: 8px;
		gap: 8px;
	}

	.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-message {
		font-size: 12px;
		line-height: 1.45;
		margin: 0;
	}

	.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons {
		flex-direction: row;
		align-items: center;
		gap: 16px;
	}

	.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept {
		flex: 1 1 auto;
		min-height: 40px;
		padding: 8px 16px;
		font-size: 16px;
	}

	.cmplz-cookiebanner.cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-deny {
		flex: 0 0 auto;
		width: auto;
		min-height: 0;
		padding: 8px 4px;
		background: none;
		border: 0;
		font-size: 14px;
		font-weight: 400;
		line-height: 1.2;
		text-decoration: underline;
		text-underline-offset: 3px;
	}
}

/* 4. Search results: the solid in-flow header (search.php) already pushes the
 * hero down, so it no longer needs the room the overlay header took. */
.search-results-hero {
	padding-top: 3rem;
}

@media (max-width: 767px) {
	.search-results-hero {
		padding-top: 2rem;
	}
}

/* 5. Department and service heros on phones: white breadcrumb, eyebrow, title
 * and lead sit over the whole photo, but Kadence's overlay fades to clear at the
 * top. A stronger, more even tint keeps the text readable on bright photos
 * while the photo still shows. Desktop keeps its own gradient. */
@media (max-width: 767px) {
	.single-service_group .doctor-block-content > .kb-section-has-overlay.alignfull > .kt-inside-inner-col::before {
		background-image: linear-gradient(
			0deg,
			color-mix(in srgb, var(--wp--preset--color--primary) 78%, transparent) 0%,
			color-mix(in srgb, var(--wp--preset--color--primary) 58%, transparent) 45%,
			color-mix(in srgb, var(--wp--preset--color--primary) 45%, transparent) 100%
		);
		opacity: 1;
	}
}
