/*
 * Temporary: makes unfinished content impossible to miss.
 *
 * Any text the client still has to supply is wrapped in .tk-placeholder, and
 * any page that is entirely scaffolding opens with .tk-placeholder-banner.
 * The styling is deliberately ugly - the point is that nobody can approve a
 * page, screenshot it or push it live without noticing.
 *
 * Yellow since 2026-10-14, on the client's instruction: anything that is not
 * verified or is outright missing may be shown on the site on a yellow
 * background, because the staging site is for us and not for the public.
 *
 * Delete this file, its enqueue in functions.php, and every .tk-placeholder
 * wrapper once the real text has arrived. Until then, a page that carries one
 * of these must not leave draft.
 */

.tk-placeholder {
	display: inline;
	padding: 0.1em 0.45em;
	border-radius: 0.2em;
	background: #ffd21e;
	color: #3a2c00 !important;
	font-weight: 700;
	font-style: normal;
	text-decoration: none;
	box-decoration-break: clone;
	-webkit-box-decoration-break: clone;
}

.tk-placeholder::before {
	content: "⚠ DOPLNIT: ";
	font-size: 0.8em;
	letter-spacing: 0.06em;
	opacity: 0.85;
}

/* A whole block of filler text rather than a single value. */
.tk-placeholder--block {
	display: block;
	margin: 0 0 1em;
	padding: 0.6em 0.9em;
	background: repeating-linear-gradient(
		135deg,
		#fff9db,
		#fff9db 12px,
		#ffefb0 12px,
		#ffefb0 24px
	);
	border-left: 6px solid #e0a800;
	color: #4a3800 !important;
	font-weight: 400;
}

.tk-placeholder--block::before {
	content: "⚠ VÝPLŇOVÝ TEXT – NENÍ ZÁVAZNÝ";
	display: block;
	margin-bottom: 0.4em;
	color: #8a6500;
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* A passage that is not filler and not missing: it is the lawyer's wording for
   something the site does not do yet (the cookie bar). It becomes valid the day
   that thing exists, so it is marked rather than deleted. */
.tk-placeholder--pending {
	display: block;
	margin: 0 0 1em;
	padding: 0.6em 0.9em;
	background: #fff9db;
	border-left: 6px solid #e0a800;
	color: #4a3800 !important;
}

.tk-placeholder--pending::before {
	content: "⚠ ZATÍM NEPLATÍ – ČEKÁ NA COOKIE LIŠTU";
	display: block;
	margin-bottom: 0.4em;
	color: #8a6500;
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

/* The page-wide warning at the top of a scaffolded page. */
.tk-placeholder-banner {
	display: block;
	margin: 0 0 1.5em;
	padding: 1em 1.2em;
	background: #ffd21e;
	border: 2px solid #e0a800;
	border-radius: 0.3em;
	color: #3a2c00 !important;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.5;
	text-transform: none;
}

.tk-placeholder-banner::before {
	content: "⚠ ";
}

@media print {
	.tk-placeholder,
	.tk-placeholder--block,
	.tk-placeholder-banner {
		outline: 3px solid #e0a800;
	}
}

/*
 * On a page built from acf/* blocks the in-content banner has nowhere to go:
 * it lands above the first block, where the absolutely positioned header sits
 * on top of it. It is hidden there and reprinted as a strip at the bottom of
 * the window by the wp_footer hook in functions.php - outside #smooth-content,
 * whose transform would otherwise break position:fixed. A page that is plain
 * text (body.tk-plain-page) keeps the banner in the flow.
 */
body:not(.tk-plain-page) .tk-placeholder-banner {
	display: none;
}

.tk-placeholder-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999;
	padding: 0.75em 1.2em;
	background: #ffd21e;
	border-top: 2px solid #e0a800;
	color: #3a2c00;
	font-size: 0.95rem;
	font-weight: 700;
	line-height: 1.4;
	text-align: center;
}

.tk-placeholder-bar::before {
	content: "⚠ ";
}

/*
 * A photograph the client has not supplied yet.
 *
 * The image itself is assets/img/placeholder-missing.svg (square, for the
 * services grid's round thumbnail and the slider) and
 * placeholder-missing-wide.svg (landscape, for the hero). They are theme
 * assets rather than uploads on purpose: the deploy ships the theme and
 * excludes wp-content/uploads, so an uploaded placeholder would never reach
 * the staging site. The fallbacks live in template-parts/blocks/services.php
 * and template-parts/blocks/hero.php.
 *
 * The size and the shape are the slot's own, taken from style.css: the grid
 * thumbnail is 4.3125rem square and clipped to a circle, the slider is
 * 557/667 portrait, the hero is a 561px-tall full-bleed strip. The square
 * file is used in the first two because object-fit:cover keeps the glyph
 * centred under either crop; `contain` in the slider stops the sides being
 * cut off a drawing that has no detail to spare.
 */

img.tk-missing-image {
	background: #ffd21e;
	outline: 2px dashed #8a6500;
	outline-offset: -4px;
}

section.services .grid .item .image img.tk-missing-image {
	/* The circle is 69px across; a dashed outline inside it reads as a hole,
	   not as a photograph that failed to load. */
	outline-offset: -3px;
}

section.services .slider .slide .wrapper .image .image-wrap img.tk-missing-image {
	object-fit: contain;
}

/* A passage we translated ourselves out of what the client supplied - true to
   the source, but nobody on the client's side has read it in this language
   yet. Not filler, so it does not get .tk-placeholder--block's "není
   závazný"; it needs one person to say yes. */
.tk-placeholder--translated {
	display: block;
	margin: 0 0 1em;
	padding: 0.6em 0.9em;
	background: #fffdf2;
	border-left: 6px solid #e0a800;
	color: #3a2c00 !important;
}

.tk-placeholder--translated::before {
	content: "⚠ PŘEKLAD K ODSOUHLASENÍ";
	display: block;
	margin-bottom: 0.4em;
	color: #8a6500;
	font-size: 0.75em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

html[lang|="sk"] .tk-placeholder--translated::before {
	content: "⚠ PREKLAD NA ODSÚHLASENIE";
}

/* The hero lays 60% black over its own media to keep the white heading
   readable (`.hero-page .video:before`, z-index 2). That is right for a
   photograph and wrong for a stand-in, which it turns into a dark olive band
   that reads as finished. The stand-in is lifted above the overlay; the
   heading sits in `.content`, a later sibling, so it stays on top of both. */
section.hero-page .video img.tk-missing-image,
section.hero-service .video img.tk-missing-image,
section.hero .video img.tk-missing-image {
	position: relative;
	z-index: 3;
}

/* The hero heading is white because it normally sits on a darkened
   photograph. Over the yellow stand-in it is barely legible, so while the
   photograph is missing the heading goes dark instead. Reverts by itself the
   moment a real image is set, because the selector depends on the stand-in
   being present. */
section.hero-page:has(img.tk-missing-image) .content .wrapper,
section.hero-page:has(img.tk-missing-image) .content .wrapper h1,
section.hero-page:has(img.tk-missing-image) .content .wrapper p,
section.hero-service:has(img.tk-missing-image) .content .wrapper,
section.hero-service:has(img.tk-missing-image) .content .wrapper h1,
section.hero-service:has(img.tk-missing-image) .content .wrapper p {
	color: #3a2c00;
}

/* The two picture slots of the service-list block are 7/12 and 5/12 of the
   row and are filled with object-fit:cover, which on a tall slot would crop
   the stand-in's drawing away. `contain` keeps the whole glyph; the yellow
   field is painted by the img's own background.

   The row's height is not set anywhere: the img is width:100%/height:100%
   inside an .item that nothing gives a height to, so the row ends up as tall
   as the wide photograph's own proportions make it. The stand-in SVG has no
   intrinsic size, so the row fell back to a square and the block stood almost
   twice as tall as it will once the photographs arrive. 2560/1378 is the
   shape of the photographs already sitting in that slot on the other
   categories (742x399 at this width), so the row is now the same height
   before and after. Drops away with the stand-in. */
section.service-list .service .flex .item img.tk-missing-image {
	object-fit: contain;
	padding: 2rem;
	box-sizing: border-box;
	aspect-ratio: 2560 / 1378;
}
