/**
 * UCM Minimal Technical Base CSS
 *
 * Provides essential display, accessibility and stacking context resets.
 * Visual typography, colors, borders and dimensions are defined in theme SCSS.
 */

/* Backdrop & Modal Stacking */
.ucm-backdrop {
	position: fixed;
	top: 0;
	left: 0;
	width: 100vw;
	height: 100vh;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	transition: opacity 0.25s ease, visibility 0.25s ease;
}

.ucm-backdrop[aria-hidden="true"] {
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
}

.ucm-backdrop[aria-hidden="false"] {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}

/* Accessibility hidden attribute */
.ucm-category-item__body[hidden] {
	display: none !important;
}

/* Floating Badge */
.ucm-badge {
	position: fixed;
	bottom: 24px;
	z-index: 999990;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	border: none;
	background: #191414;
	color: #ffffff;
	padding: 8px 16px;
	border-radius: 20px;
	font-size: 13px;
	transition: transform 0.2s ease, opacity 0.2s ease;
}

.ucm-badge--bottom-left {
	left: 24px;
}

.ucm-badge--bottom-right {
	right: 24px;
}

.ucm-badge[hidden] {
	display: none !important;
}

/* Switch Accessibility & Functional State */
.ucm-toggle {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 20px;
	cursor: pointer;
	flex-shrink: 0;
}

.ucm-toggle__input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.ucm-toggle__slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #d3d1c8;
	border-radius: 30px;
	transition: background-color 0.2s ease;
}

.ucm-toggle__knob {
	position: absolute;
	height: 16px;
	width: 16px;
	left: 2px;
	bottom: 2px;
	background-color: #ffffff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: transform 0.2s ease;
}

.ucm-toggle__input:checked + .ucm-toggle__slider {
	background-color: #191414;
}

.ucm-toggle__input:checked + .ucm-toggle__slider .ucm-toggle__knob {
	transform: translateX(20px);
}

.ucm-toggle__icon--check {
	display: none;
	color: #191414;
}

.ucm-toggle__icon--x {
	display: block;
	color: #888888;
}

.ucm-toggle__input:checked + .ucm-toggle__slider .ucm-toggle__icon--check {
	display: block;
}

.ucm-toggle__input:checked + .ucm-toggle__slider .ucm-toggle__icon--x {
	display: none;
}
