/* ==========================================================================
   Manufacturing & Services page - Production section popups
   Loaded separately from the main style.css, only on this template.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   Buttons that open the popups (sit inside the Production text box).

   NOTE ON VISUAL LANGUAGE: the theme has no single shared class for a
   "white outline pill CTA on a dark image overlay" - it's re-declared per
   section instead (see #homepage-floor1 .video-overlay-button,
   #homepage-floor2 .tab-pane-item-button, #wellness ...-capabilitiy-button).
   All three use the exact same values: 100px radius, 2px solid white
   border, 700 weight, hover fills white / text turns #333. That's the
   pattern reproduced below, instead of inventing a new visual style.
--------------------------------------------------------------------------- */
.services-floor2-item-popups {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.production-popup-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 6px 24px;
	border-radius: 100px;
	border: 2px solid #ffffff;
	background-color: transparent;
	color: #ffffff;
	font-size: 1rem;
	font-weight: 700;
	line-height: 1.4;
	white-space: nowrap;
	cursor: pointer;
	transition: all 0.3s ease;
}

@media (min-width: 992px) {
	.production-popup-btn {
		font-size: 0.94vw;
		padding: 0.4rem 1.4rem;
	}
}

.production-popup-btn:hover,
.production-popup-btn:focus {
	background-color: #ffffff;
	color: #333333;
	outline: 0;
}

.production-popup-btn-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.production-popup-btn-icon svg {
	display: block;
}

@media (max-width: 575.98px) {
	.services-floor2-item-popups {
		flex-direction: column;
	}

	.production-popup-btn {
		width: 100%;
		justify-content: center;
	}
}

/* ---------------------------------------------------------------------------
   Popup / modal
--------------------------------------------------------------------------- */
.production-modal .modal-content {
	border: 0;
	border-radius: 20px;
	overflow: hidden;
}

.production-modal .modal-header {
	align-items: center;
	border-bottom: 1px solid #E9ECEF;
	padding: 1.25rem 1.75rem;
}

.production-modal .modal-title {
	margin-bottom: 0;
	font-size: 1.375rem;
	font-weight: 700;
	color: #282828;
}

.production-modal .modal-body {
	padding: 1.5rem 1.75rem;
	max-height: 80vh;
	overflow-y: auto;
}

@media (max-width: 575.98px) {
	.production-modal .modal-header,
	.production-modal .modal-body {
		padding: 1.1rem;
	}
}

/* Two columns on desktop (media | text) so as much as possible is visible
   without scrolling on a normal laptop screen. Below lg it stacks. */
.production-modal-grid {
	display: block;
}

@media (min-width: 992px) {
	.production-modal-dialog {
		max-width: 900px;
	}

	.production-modal-grid {
		display: flex;
		align-items: flex-start;
		gap: 1.75rem;
	}

	.production-modal-media {
		flex: 0 0 42%;
		max-width: 42%;
	}

	.production-modal-grid .production-modal-text {
		flex: 1 1 auto;
		min-width: 0;
	}

	.production-modal-grid--text-only .production-modal-text {
		flex: 1 1 100%;
	}
}

.production-modal-media {
	margin-bottom: 1.25rem;
}

@media (min-width: 992px) {
	.production-modal-media {
		margin-bottom: 0;
	}
}

/* Media (image/video) is wrapped and clipped by this container, so corner
   rounding is always uniform on all 4 sides no matter what the inner
   element (native <video>, <img>, or an oEmbed <iframe>) does internally,
   and there's never any extra margin/whitespace around it. */
.production-modal-media-item {
	border-radius: 14px;
	overflow: hidden;
	line-height: 0;
	margin: 0;
	padding: 0;
}

.production-modal-media-item + .production-modal-media-item {
	margin-top: 1rem;
}

.production-modal-media-item img,
.production-modal-media-item video {
	display: block;
	margin: 0;
	padding: 0;
	border: 0;
	vertical-align: top;
}

/* Videos always fill the column width. */
.production-modal-media-item video {
	width: 100%;
	height: auto;
}

/* Images are shown at their real size, capped to the column width -
   never stretched/upscaled past their actual resolution (that's what
   was making small logos/badges look blurry). Centered in case the
   source image is narrower than the column. */
.production-modal-media-item img {
	width: auto;
	max-width: 100%;
	height: auto;
	margin-inline: auto;
}

.production-modal-media-item.ratio iframe {
	display: block;
	width: 100%;
	height: 100%;
	margin: 0;
	padding: 0;
	border: 0;
	vertical-align: top;
}

/* ---------------------------------------------------------------------------
   Image slideshow (up to 3 images, auto-rotating fade, no manual nav)
--------------------------------------------------------------------------- */
.production-modal-slideshow {
	position: relative;
	line-height: 0;
	/* Fixed frame so all (up to 3) images share one consistent size and
	   the crossfade never causes the popup to jump/resize between
	   slides - regardless of each image's own aspect ratio. */
	height: 220px;
}

@media (min-width: 992px) {
	.production-modal-slideshow {
		height: 260px;
	}
}

.production-modal-slideshow .production-modal-slide {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	/* Fits the whole image inside the fixed frame without cropping it -
	   important here since the images vary a lot in proportions/framing
	   (e.g. a tall jelly mold vs. a wide 3D render); any empty space left
	   around it just blends into the popup's white background. */
	object-fit: contain;
	margin: 0;
	opacity: 0;
	transition: opacity 0.8s ease-in-out;
}

.production-modal-slideshow .production-modal-slide.is-active {
	opacity: 1;
}

.production-modal-text :last-child {
	margin-bottom: 0;
}

/* The theme's own global .entry-content styles make <ol> text tiny
   (0.5rem) and give <ul>/<ol> browser-default block spacing - override
   both so lists inside the popup read normally. */
.production-modal-text ul,
.production-modal-text ol {
	margin: 0 0 1rem;
}

.production-modal-text ul li,
.production-modal-text ol li {
	font-size: 1.125rem;
	line-height: 1.5;
	margin-bottom: 0.35rem;
}

.production-modal-text ul li:last-child,
.production-modal-text ol li:last-child {
	margin-bottom: 0;
}

/* ---------------------------------------------------------------------------
   Darker backdrop behind these specific popups (class added by scripts.js)
--------------------------------------------------------------------------- */
.production-modal-backdrop.show {
	--bs-backdrop-opacity: 0.75;
}

/* RTL: keep icon/label order feeling natural regardless of direction */
[dir="rtl"] .production-popup-btn {
	direction: rtl;
}