/**
 * Technologie Max – baner zgód na cookies.
 */

.tm-cookie {
	position: fixed;
	bottom: 24px;
	left: 24px;
	z-index: 300;
	width: 480px;
	max-width: calc(100vw - 48px);
	max-height: calc(100vh - 48px);
	padding: 28px;
	overflow-y: auto;
	border-radius: 20px;
	background-color: var(--tm-surface);
	box-shadow: inset 0 0 0 1px var(--tm-border), 0 24px 64px rgba(15, 23, 42, 0.22);
	color: var(--tm-text);
}

.tm-cookie[hidden],
.tm-cookie__view[hidden] {
	display: none;
}

.tm-cookie__title {
	color: var(--tm-text);
	font-size: 20px;
	font-weight: 800;
	letter-spacing: -0.4px;
	line-height: 26px;
}

.tm-cookie__text {
	margin-top: 10px;
	color: var(--tm-text-2);
	font-size: 15px;
	line-height: 23px;
}

.tm-cookie__text a {
	color: var(--tm-blue);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.tm-cookie__buttons {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 10px;
	margin-top: 20px;
}

.tm-cookie__buttons .tm-btn {
	flex: 1 1 auto;
	height: 46px;
	padding: 0 18px;
	font-size: 15px;
}

.tm-cookie__link {
	flex: 1 1 100%;
	height: 36px;
	color: var(--tm-text-2);
	font-size: 14px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tm-cookie__link:hover {
	color: var(--tm-blue);
}

.tm-cookie__groups {
	margin-top: 8px;
}

.tm-cookie__group {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
	padding: 14px 0;
	border-bottom: 1px solid var(--tm-border);
}

.tm-cookie__group:last-child {
	border-bottom: 0;
}

.tm-cookie__group-text {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.tm-cookie__group-name {
	font-size: 15px;
	font-weight: 700;
}

.tm-cookie__group-desc {
	color: var(--tm-text-2);
	font-size: 13px;
	line-height: 19px;
}

.tm-switch {
	position: relative;
	display: block;
	width: 44px;
	height: 26px;
	margin-top: 2px;
	flex-shrink: 0;
	cursor: pointer;
}

.tm-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

.tm-switch input:disabled {
	cursor: not-allowed;
}

.tm-switch__track {
	display: block;
	width: 100%;
	height: 100%;
	border-radius: 13px;
	background-color: var(--tm-border-strong);
	transition: background-color 0.2s ease;
}

.tm-switch__track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background-color: #fff;
	box-shadow: 0 1px 3px rgba(15, 23, 42, 0.25);
	transition: transform 0.2s ease;
}

.tm-switch input:checked + .tm-switch__track {
	background-color: var(--tm-blue);
}

.tm-switch input:checked + .tm-switch__track::after {
	transform: translateX(18px);
}

.tm-switch input:disabled + .tm-switch__track {
	opacity: 0.55;
}

.tm-switch input:focus-visible + .tm-switch__track {
	outline: 2px solid var(--tm-blue);
	outline-offset: 2px;
}

.tm-footer__cookies {
	margin-left: 16px;
	color: #a9b4c3;
	font-size: 14px;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tm-footer__cookies:hover {
	color: #fff;
}

@media (max-width: 720px) {
	.tm-cookie {
		right: 0;
		bottom: 0;
		left: 0;
		width: auto;
		max-width: none;
		max-height: 85vh;
		padding: 20px;
		border-radius: 20px 20px 0 0;
	}

	.tm-cookie__buttons .tm-btn {
		flex: 1 1 100%;
	}

	.tm-footer__cookies {
		display: block;
		margin: 8px 0 0;
	}
}

@media print {
	.tm-cookie {
		display: none;
	}
}
