/*
 * adapter_diagram.css - shared styling for the "which controllers -> which console"
 * graphic drawn by assets/js/adapter_diagram.js.
 *
 * Loaded by two pages so they stay pixel-identical:
 *   - em_adapters.html : the full auto-cycling / clickable interactive diagram.
 *   - the order confirmation page (order_complete_page.pl -> template_message.html):
 *     a single static frame showing only the adapter the customer bought.
 *
 * The container sizing is a class (.adapter-diagram) so both the interactive
 * copy (which also keeps the #adapter-diagram id for the JS to hook into) and
 * the static copy share it. Anything that is interactive-only (the pointer
 * cursor, manual-mode controls, output chips) stays keyed off #adapter-diagram
 * so it never applies to the static copy.
 */

/* ---- Animated controller/console overview graphic ---- */
.adapter-diagram-wrap {
	width: 670px;
	box-sizing: border-box;
	margin: 4px auto 26px auto;
	background: #FFFFFF;
	border: 1px solid #DADADA;
	box-shadow: 0 2px 8px rgba(0,0,0,0.12);
	padding: 10px;
}
.adapter-diagram {
	position: relative;
	width: 670px;
	height: 231px;
	overflow: hidden;
}
.adapter-diagram-side {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}
.adapter-frame-layer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	opacity: 0;
	transition-property: opacity;
	transition-timing-function: ease;
}
.adapter-frame-layer.is-visible { opacity: 1; }
.adapter-diagram-body {
	position: absolute;
	z-index: 3;
	display: block;
}
.adapter-icon-swatch {
	position: absolute;
	z-index: 2;
	border-radius: 3px;
	background: var(--swatch-color, #999999);
}
.adapter-icon-img {
	position: absolute;
	z-index: 2;
	display: block;
}
.adapter-icon-backdrop {
	position: absolute;
	z-index: 1;
	display: block;
	filter: grayscale(1);
}
.adapter-line {
	position: absolute;
	z-index: 0;
	opacity: 0.85;
}
.adapter-caption {
	position: absolute;
	left: 0;
	top: 197px;
	width: 100%;
	height: 34px;
	box-sizing: border-box;
}
.adapter-caption-layer {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 3px;
	opacity: 0;
	transition-property: opacity;
	transition-timing-function: ease;
}
.adapter-caption-layer.is-visible { opacity: 1; }
.adapter-caption-name {
	font-size: 15px;
	font-weight: bold;
	letter-spacing: 0.5px;
}
.adapter-caption-desc {
	font-size: 11px;
	font-style: italic;
	color: #777777;
}

#adapter-diagram:not(.is-manual) { cursor: pointer; }
.adapter-icon-img.is-clickable,
.adapter-icon-swatch.is-clickable {
	cursor: pointer;
	transition: opacity 150ms;
}
.adapter-icon-img.is-clickable:hover,
.adapter-icon-swatch.is-clickable:hover {
	opacity: 0.7;
}

.adapter-diagram-cta {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 14px;
	flex-wrap: wrap;
	margin-top: 10px;
	min-height: 20px;
}
.adapter-diagram-hint {
	font-size: 12px;
	color: #777777;
	cursor: pointer;
	text-decoration: underline;
	text-decoration-style: dotted;
}
.adapter-diagram-hint:hover { color: #444444; }
.adapter-diagram-buy-btn {
	display: none;
	padding: 9px 20px;
	font-size: 12px;
	font-weight: bold;
	letter-spacing: 1px;
	color: #fff;
	text-decoration: none;
	transition: opacity 150ms;
}
.adapter-diagram-buy-btn:hover { opacity: 0.85; color: #fff; text-decoration: none; }
.adapter-diagram-details-btn {
	display: none;
	padding: 7px 18px;
	font-size: 12px;
	font-weight: bold;
	letter-spacing: 1px;
	background: #fff;
	border: 2px solid #999999;
	color: #444444;
	text-decoration: none;
	transition: opacity 150ms, border-color 150ms, color 150ms;
}
.adapter-diagram-details-btn:hover { opacity: 0.7; text-decoration: none; }
.adapter-diagram-reset {
	display: none;
	background: none;
	border: none;
	padding: 0;
	font-size: 12px;
	color: #777777;
	cursor: pointer;
	text-decoration: underline;
	font-family: inherit;
}
.adapter-diagram-reset:hover { color: #444444; }

.adapter-diagram-outputs {
	display: none;
	align-items: center;
	justify-content: center;
	gap: 8px;
	flex-wrap: wrap;
	margin-top: 12px;
}
.adapter-output-chip {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #FFFFFF;
	border: 1px solid #DADADA;
	padding: 5px 12px;
	font-family: inherit;
	font-size: 11px;
	color: #333;
	cursor: pointer;
	transition: border-color 150ms, opacity 150ms;
}
.adapter-output-chip:hover { border-color: #999999; }
.adapter-output-chip-dot {
	width: 10px;
	height: 10px;
	border-radius: 2px;
	display: inline-block;
}
.adapter-output-chip.is-current {
	opacity: 0.4;
	cursor: default;
}
.adapter-output-chip.is-current:hover { border-color: #DADADA; }
