/*
 * WordPress-specific overrides layered after the legacy compiled bundles.
 * Keep this file tiny: anything visual belongs to the legacy CSS.
 */

/* Keep the fixed sticky nav below the WP admin bar when logged in. */
body.admin-bar header.stickynav {
	top: 32px;
}

/* Remove the orphaned 2px border across the top of the nav bar (the only use
   of #37386e in the legacy CSS — likely a leftover progress-bar rule). */
header.stickynav nav {
	border-top: 0;
}

/*
 * Home rotating studios box: the legacy slider used a Cloudinary fill-crop to
 * force each portrait square; WP serves natural-aspect media-library images, so
 * crop to the square box here instead of stretching (the .slides img rule sets
 * width/height 100%).
 */
.studios.squarebox .slides img {
	object-fit: cover;
}

/*
 * Aesthetic portrait = the legacy Cloudinary crop:pad on white: the whole image
 * contained on a square, never cropped. Reproduce that with object-fit:contain
 * on a white placeholder (the square box comes from the legacy padding-bottom
 * trick). Scoped with the full legacy prefix so it wins; photo/logo (cover-crop)
 * are untouched.
 */
.page_content.studio_profile section.portraits .portrait .studio_aesthetic_portrait .placeholder {
	position: relative;
	background-color: #fff;
}
.page_content.studio_profile section.portraits .portrait .studio_aesthetic_portrait .placeholder picture,
.page_content.studio_profile section.portraits .portrait .studio_aesthetic_portrait .placeholder img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.page_content.studio_profile section.portraits .portrait .studio_aesthetic_portrait .placeholder img {
	object-fit: contain;
}

/*
 * Photo portrait = the legacy Cloudinary cover-crop: the image fills the box and
 * crops to fit (vs. the aesthetic portrait's contain/pad). The legacy padding-bottom
 * trick sizes the box (80% here), so the image must be absolutely positioned to fill
 * it — WP serves natural-aspect media, which otherwise won't fill the height:0 box.
 */
.page_content.studio_profile section.portraits .portrait .studio_photo_portrait .placeholder {
	position: relative;
}
.page_content.studio_profile section.portraits .portrait .studio_photo_portrait .placeholder picture,
.page_content.studio_profile section.portraits .portrait .studio_photo_portrait .placeholder img {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.page_content.studio_profile section.portraits .portrait .studio_photo_portrait .placeholder img {
	object-fit: cover;
}

/*
 * Click-to-load Vimeo façade: a poster + play button that swaps in the player
 * iframe on click, so nothing from Vimeo loads until the visitor opts in. The
 * 16:9 box reserves space (no layout shift) and matches the legacy fixed height
 * (16:9 of the 940px column ≈ the old 529px).
 */
.video_facade {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background-color: #20215c;
	overflow: hidden;
}
.video_facade .video_facade_play {
	display: block;
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	padding: 0;
	margin: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
}
.video_facade .video_facade_play picture,
.video_facade .video_facade_play img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
/* Reuse the homepage Conversations tile's play affordance (the pink IOTS cube +
   white triangle, .box2 a .cube/.play_icon), anchored to the poster's lower-left
   corner instead of dead-center. Both spans share a common anchor point so the
   triangle stays nested in the cube, using box2's exact relative margins. */
.video_facade .video_facade_play .cube {
	display: block;
	position: absolute;
	left: 60px;
	top: calc(100% - 60px);
	margin-left: -38px;
	margin-top: -30px;
	width: 60px;
	height: 60px;
	z-index: 2;
	background: transparent url('../img/imageofthestudio/logo/imageofthestudio_pinkcube.svg') 0 4px no-repeat;
	background-size: 60px;
	opacity: 0.6;
	transition: opacity 0.3s ease-in-out;
}
.video_facade .video_facade_play:hover .cube,
.video_facade .video_facade_play:focus-visible .cube {
	opacity: 0.8;
}
.video_facade .video_facade_play:active .cube {
	opacity: 1;
}
.video_facade .video_facade_play .play_icon {
	position: absolute;
	left: 60px;
	top: calc(100% - 60px);
	margin-left: -12px;
	margin-top: -12px;
	z-index: 3;
	border: solid transparent;
	border-width: 12px;
	border-left-color: #fff;
}
.video_facade iframe.video {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
}

/* Cookie-consent banner (inc/analytics.php + assets/js/consent.js). Hidden until
   consent.js reveals it for visitors who haven't chosen; the [hidden] attribute
   keeps it out of the page until then. */
.iots-consent[hidden] {
	display: none;
}
.iots-consent {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 1000;
	background: #1a1a1a;
	color: #fff;
	font-size: 13px;
	line-height: 1.5;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.3);
}
.iots-consent__inner {
	max-width: 1100px;
	margin: 0 auto;
	padding: 14px 18px;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 20px;
	justify-content: space-between;
}
.iots-consent__text {
	margin: 0;
	flex: 1 1 280px;
	color: #fff; /* beat legacy `p,ul li,ol li{color:#20215c}`; inherited #fff loses to a directly-matching rule */
}
.iots-consent__link {
	color: #fff;
	text-decoration: underline;
}
.iots-consent__actions {
	display: flex;
	gap: 10px;
	flex: 0 0 auto;
}
.iots-consent__btn {
	font: inherit;
	cursor: pointer;
	border: 1px solid #fff;
	border-radius: 2px;
	padding: 8px 18px;
	background: transparent;
	color: #fff;
}
.iots-consent__btn--accept {
	background: #fff;
	color: #1a1a1a;
}
.iots-consent__btn:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}

/* High-contrast mode toggle: a floating icon button, lower-right. Always
   visible; its pressed state + persistence are driven by contrast-toggle.js, the
   colour layer it switches lives in high-contrast.css. Sits above the consent
   banner when that's showing (contrast-toggle.js sets --iots-consent-h). */
.iots-contrast-toggle {
	position: fixed;
	right: 16px;
	bottom: 16px;
	z-index: 1001; /* above the consent banner (1000) */
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px; /* AAA target size (2.5.5) */
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #1a1a1a;
	color: #fff;
	cursor: pointer;
}
.iots-contrast-toggle:hover {
	background: #000;
}
.iots-contrast-toggle:focus-visible {
	outline: 2px solid #20215c;
	outline-offset: 2px;
}
/* Pressed = high-contrast active: use the HC accent pink (not a white fill,
   which would vanish on the lighter HC canvas now that there's no border). */
.iots-contrast-toggle[aria-pressed="true"] {
	background: #8a0052;
	color: #fff;
}
.iots-contrast-toggle__icon {
	display: block;
}
/* Lift the toggle above the consent banner while it's visible. The toggle is a
   later DOM sibling (footer priority 11 vs the banner's 10). */
#iots-consent:not([hidden]) ~ .iots-contrast-toggle {
	bottom: calc(16px + var(--iots-consent-h, 88px));
}
