/* VK piškotki - banner, settings dialog, YouTube placeholder, cookie table. */

.vk-cookies {
	--vkc-ink: #111;
	--vkc-text: #444;
	--vkc-muted: #6b6b6b;
	--vkc-line: rgba(0, 0, 0, .1);
	--vkc-line-strong: rgba(0, 0, 0, .2);
	--vkc-surface: #fff;
	--vkc-soft: #f5f5f2;
	--vkc-primary: rgb(23, 179, 33);
	--vkc-primary-hover: rgb(19, 150, 28);
	--vkc-shadow: 0 24px 60px -20px rgba(17, 24, 39, .35), 0 2px 8px rgba(17, 24, 39, .08);
	--vkc-font: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	font-family: var(--vkc-font);
	color: var(--vkc-ink);
}
.vk-cookies *, .vk-cookies *::before, .vk-cookies *::after { box-sizing: border-box; }
.vk-cookies [hidden] { display: none !important; }
.vk-cookies p { margin: 0; font-family: var(--vkc-font); letter-spacing: 0; }
.vk-cookies a { color: var(--vkc-ink); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.vk-cookies button { font-family: var(--vkc-font); letter-spacing: 0; text-transform: none; }

/* Banner ------------------------------------------------------------------ */
.vk-cc-banner {
	position: fixed;
	left: 24px;
	bottom: 24px;
	z-index: 2147483000;
	width: min(440px, calc(100vw - 48px));
	padding: 24px;
	border: 1px solid var(--vkc-line);
	border-radius: 20px;
	background: var(--vkc-surface);
	box-shadow: var(--vkc-shadow);
	animation: vk-cc-in .35s cubic-bezier(.2, .8, .2, 1);
}
@keyframes vk-cc-in { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }

.vk-cc-title { font-size: 18px; font-weight: 800; line-height: 1.25; color: var(--vkc-ink); }
.vk-cc-copy { margin-top: 8px !important; font-size: 14.5px; line-height: 1.55; color: var(--vkc-text); }

.vk-cc-banner-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-top: 18px;
}
.vk-cc-banner-actions .vk-cc-link { grid-column: 1 / -1; justify-self: center; }

.vk-cookies .vk-cc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 46px;
	margin: 0;
	padding: 0 18px;
	border: 1px solid var(--vkc-ink);
	border-radius: 100px;
	background: var(--vkc-surface);
	color: var(--vkc-ink);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.2;
	cursor: pointer;
	transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.vk-cookies .vk-cc-btn:hover { background: var(--vkc-soft); color: var(--vkc-ink); }
.vk-cookies .vk-cc-btn-primary { border-color: var(--vkc-primary); background: var(--vkc-primary); color: #fff; }
.vk-cookies .vk-cc-btn-primary:hover { border-color: var(--vkc-primary-hover); background: var(--vkc-primary-hover); color: #fff; }
.vk-cookies .vk-cc-link {
	margin: 2px 0 0;
	padding: 8px 10px;
	border: 0;
	background: none;
	color: var(--vkc-ink);
	font-size: 14.5px;
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	cursor: pointer;
}
.vk-cookies .vk-cc-btn:focus-visible,
.vk-cookies .vk-cc-link:focus-visible,
.vk-cookies .vk-cc-close:focus-visible,
.vk-cookies .vk-cc-cat-toggle:focus-visible,
.vk-cookies .vk-cc-revisit:focus-visible,
.vk-cc-switch input:focus-visible + .vk-cc-switch-track { outline: 3px solid rgba(23, 179, 33, .45); outline-offset: 2px; }

/* Settings dialog ----------------------------------------------------------- */
.vk-cc-modal {
	position: fixed;
	inset: 0;
	z-index: 2147483001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}
.vk-cc-backdrop { position: absolute; inset: 0; background: rgba(17, 17, 17, .45); }
.vk-cc-dialog {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(620px, 100%);
	max-height: min(760px, calc(100vh - 48px));
	border-radius: 22px;
	background: var(--vkc-surface);
	box-shadow: var(--vkc-shadow);
	outline: none;
	animation: vk-cc-in .25s ease;
}
.vk-cc-dialog-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 22px 24px 14px;
}
.vk-cc-dialog-title { font-size: 21px; font-weight: 800; line-height: 1.2; }
.vk-cookies .vk-cc-close {
	position: relative;
	flex: none;
	width: 40px;
	height: 40px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--vkc-line-strong);
	border-radius: 50%;
	background: var(--vkc-surface);
	cursor: pointer;
}
.vk-cc-close span {
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 2px;
	border-radius: 2px;
	background: var(--vkc-ink);
	transform: translate(-50%, -50%) rotate(45deg);
}
.vk-cc-close span + span { transform: translate(-50%, -50%) rotate(-45deg); }

.vk-cc-dialog-body { overflow-y: auto; padding: 0 24px 8px; overscroll-behavior: contain; }
.vk-cc-dialog-body > .vk-cc-copy { margin: 0 0 16px !important; }

.vk-cc-cat { padding: 16px 0; border-top: 1px solid var(--vkc-line); }
.vk-cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.vk-cookies .vk-cc-cat-toggle {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	padding: 4px 0;
	border: 0;
	background: none;
	color: var(--vkc-ink);
	font-size: 16px;
	font-weight: 700;
	text-align: left;
	cursor: pointer;
}
.vk-cc-chevron {
	width: 8px;
	height: 8px;
	border-right: 2px solid var(--vkc-ink);
	border-bottom: 2px solid var(--vkc-ink);
	transform: rotate(-45deg);
	transition: transform .15s ease;
}
.vk-cc-cat-toggle[aria-expanded="true"] .vk-cc-chevron { transform: rotate(45deg); }
.vk-cc-always { flex: none; color: var(--vkc-primary-hover); font-size: 13.5px; font-weight: 700; }
.vk-cc-cat-desc { margin-top: 6px !important; padding-left: 18px; font-size: 14px; line-height: 1.55; color: var(--vkc-text); }
.vk-cc-cat-list { display: grid; gap: 8px; margin: 12px 0 0 18px; }
.vk-cc-cookie { padding: 10px 12px; border-radius: 12px; background: var(--vkc-soft); }
.vk-cc-cookie-name { font-size: 13.5px; font-weight: 700; word-break: break-word; }
.vk-cc-cookie-meta { margin-top: 2px !important; font-size: 12.5px; color: var(--vkc-muted); }
.vk-cc-cookie-desc { margin-top: 4px !important; font-size: 13.5px; line-height: 1.45; color: var(--vkc-text); }

/* Switch */
.vk-cc-switch { position: relative; flex: none; display: inline-flex; margin: 0; cursor: pointer; }
.vk-cc-switch input { position: absolute; width: 1px; height: 1px; margin: 0; opacity: 0; }
.vk-cc-switch-track {
	position: relative;
	width: 46px;
	height: 26px;
	border-radius: 100px;
	background: #cfcfcf;
	transition: background .15s ease;
}
.vk-cc-switch-track::after {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: transform .15s ease;
}
.vk-cc-switch input:checked + .vk-cc-switch-track { background: var(--vkc-primary); }
.vk-cc-switch input:checked + .vk-cc-switch-track::after { transform: translateX(20px); }
.vk-cookies .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(1px, 1px, 1px, 1px);
	white-space: nowrap;
}

.vk-cc-dialog-foot {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 8px;
	padding: 16px 24px 22px;
	border-top: 1px solid var(--vkc-line);
}

/* Small cookie button to change the choice later --------------------------- */
.vk-cookies .vk-cc-revisit {
	position: fixed;
	left: 16px;
	bottom: 16px;
	z-index: 9990;
	display: grid;
	place-items: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 1px solid var(--vkc-line);
	border-radius: 50%;
	background: var(--vkc-surface);
	color: var(--vkc-ink);
	box-shadow: 0 6px 18px -6px rgba(17, 24, 39, .35);
	cursor: pointer;
	opacity: .9;
	transition: opacity .15s ease, transform .15s ease;
}
.vk-cookies .vk-cc-revisit:hover { opacity: 1; transform: translateY(-2px); }
/* MyoTape / SPIRA pages have a sticky buy bar at the bottom on phones. */
@media (max-width: 900px) {
	body.mt-body .vk-cookies .vk-cc-revisit { bottom: 92px; }
}

html.vk-cc-modal-open { overflow: hidden; }

/* Phones: banner as a bottom sheet -------------------------------------------- */
@media (max-width: 600px) {
	.vk-cc-banner {
		left: 8px;
		right: 8px;
		bottom: 8px;
		width: auto;
		padding: 20px 18px 14px;
		border-radius: 18px;
	}
	.vk-cc-copy { font-size: 14px; }
	.vk-cc-modal { align-items: flex-end; padding: 0; }
	.vk-cc-dialog { max-height: 92vh; border-radius: 20px 20px 0 0; }
	.vk-cc-dialog-head { padding: 18px 18px 12px; }
	.vk-cc-dialog-body { padding: 0 18px 8px; }
	.vk-cc-dialog-foot { grid-template-columns: 1fr 1fr; padding: 14px 18px calc(16px + env(safe-area-inset-bottom)); }
	.vk-cc-dialog-foot .vk-cc-btn-primary { grid-column: 1 / -1; order: -1; }
}

@media (prefers-reduced-motion: reduce) {
	.vk-cc-banner, .vk-cc-dialog { animation: none; }
	.vk-cookies * { transition: none !important; }
}

/* YouTube placeholder --------------------------------------------------------- */
.vk-embed {
	position: relative;
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	border-radius: 12px;
	background: #1b1b1b center / cover no-repeat;
	font-family: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
.vk-embed iframe { position: absolute; inset: 0; width: 100% !important; height: 100% !important; border: 0; }
.vk-embed:not(.is-loaded) iframe { display: none; }
.vk-embed.is-loaded .vk-embed-box { display: none; }
.vk-embed-box {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 16px;
	background: rgba(0, 0, 0, .6);
	color: #fff;
	text-align: center;
}
.vk-embed-title { font-size: 17px; font-weight: 800; }
.vk-embed-text { max-width: 420px; font-size: 13.5px; line-height: 1.45; opacity: .9; }
.vk-embed-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 8px; }
.vk-embed button {
	margin: 0;
	padding: 10px 16px;
	border: 1px solid #fff;
	border-radius: 100px;
	background: transparent;
	color: #fff;
	font: 700 14px/1.2 inherit;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
}
.vk-embed .vk-embed-play { border-color: rgb(23, 179, 33); background: rgb(23, 179, 33); }

/* Cookie table ([vk_cookie_policy], [vk_cookie_table]) ------------------------ */
.vk-ct-wrap { width: 100%; margin: 12px 0 28px; overflow-x: auto; }
.vk-ct { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; }
.vk-ct th, .vk-ct td { padding: 10px 12px; border-bottom: 1px solid rgba(0, 0, 0, .1); text-align: left; vertical-align: top; }
.vk-ct th { font-weight: 700; background: rgba(0, 0, 0, .03); }
.vk-ct code { font-size: 13px; white-space: normal; word-break: break-word; background: none; }
