/* SK Cookie Súhlas – frontend
   Farby a zaoblenie sa nastavujú v administrácii cez CSS premenné (--skcc-*). */

#skcc,
#skcc *,
.skcc-embed,
.skcc-embed * {
	box-sizing: border-box;
}

#skcc [hidden],
.skcc-embed [hidden] {
	display: none !important;
}

#skcc {
	--skcc-z: 2147483000;
	--skcc-line: color-mix(in srgb, var(--skcc-text) 14%, transparent);
	--skcc-shadow: 0 12px 40px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(15, 23, 42, 0.08);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.55;
	color: var(--skcc-text);
}

@supports not (color: color-mix(in srgb, red 10%, transparent)) {
	#skcc { --skcc-line: rgba(127, 127, 127, 0.25); }
}

html.skcc-lock,
html.skcc-lock body {
	overflow: hidden;
}

/* ---------- Typografia ---------- */

#skcc .skcc-title {
	margin: 0 0 0.35em;
	padding: 0;
	font-family: inherit;
	font-size: 1.15em;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: inherit;
}

#skcc .skcc-text p {
	margin: 0 0 0.6em;
	font-size: 0.95em;
	color: inherit;
}

#skcc .skcc-text p:last-child {
	margin-bottom: 0;
}

#skcc .skcc-text a {
	color: var(--skcc-link);
	text-decoration: underline;
	text-underline-offset: 2px;
}

/* ---------- Tlačidlá ---------- */

#skcc .skcc-btn,
.skcc-embed .skcc-btn {
	-webkit-appearance: none;
	appearance: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	margin: 0;
	padding: 0.6em 1.25em;
	border: 2px solid transparent;
	border-radius: var(--skcc-radius, 8px);
	box-shadow: none;
	font-family: inherit;
	font-size: 0.95em;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-align: center;
	text-transform: none;
	text-decoration: none;
	cursor: pointer;
	transition: filter 0.15s ease;
}

#skcc .skcc-btn--primary,
.skcc-embed .skcc-btn--primary {
	background: var(--skcc-primary, #1f3a5f);
	border-color: var(--skcc-primary, #1f3a5f);
	color: var(--skcc-primary-text, #fff);
}

#skcc .skcc-btn--secondary {
	background: var(--skcc-secondary);
	border-color: var(--skcc-secondary);
	color: var(--skcc-secondary-text);
}

#skcc .skcc-btn:hover,
.skcc-embed .skcc-btn:hover {
	filter: brightness(0.92);
}

#skcc button:focus-visible,
#skcc a:focus-visible,
.skcc-embed button:focus-visible,
#skcc .skcc-switch__input:focus-visible + .skcc-switch__track {
	outline: 3px solid var(--skcc-primary, #1f3a5f);
	outline-offset: 2px;
}

/* ---------- Spoločné pre lištu ---------- */

#skcc .skcc-banner {
	position: fixed;
	z-index: var(--skcc-z);
	background: var(--skcc-bg);
	color: var(--skcc-text);
	box-shadow: var(--skcc-shadow);
}

#skcc .skcc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

#skcc .skcc-policy {
	margin-top: 0.5em;
}

/* ---------- Rozloženie: lišta ---------- */

#skcc.skcc--bar .skcc-banner {
	left: 0;
	right: 0;
	animation: skcc-bar-up 0.35s ease-out both;
}

#skcc.skcc--bar-bottom .skcc-banner {
	bottom: 0;
	border-top: 1px solid var(--skcc-line);
}

#skcc.skcc--bar-top .skcc-banner {
	top: 0;
	border-bottom: 1px solid var(--skcc-line);
	animation-name: skcc-bar-down;
}

#skcc.skcc--bar .skcc-banner__inner {
	display: flex;
	align-items: center;
	gap: 16px 40px;
	max-width: 1240px;
	margin: 0 auto;
	padding: 20px 24px;
}

#skcc.skcc--bar .skcc-banner__content {
	flex: 1 1 auto;
	max-width: 760px;
}

#skcc.skcc--bar .skcc-actions {
	flex: 0 0 auto;
	flex-wrap: nowrap;
}

/* ---------- Rozloženie: okno v rohu ---------- */

#skcc.skcc--box .skcc-banner {
	bottom: 20px;
	width: calc(100% - 40px);
	max-width: 420px;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
	border-radius: calc(var(--skcc-radius) + 4px);
	animation: skcc-fade-up 0.35s ease-out both;
}

#skcc.skcc--box-bottom-right .skcc-banner { right: 20px; }
#skcc.skcc--box-bottom-left .skcc-banner { left: 20px; }

#skcc.skcc--box .skcc-banner__inner,
#skcc.skcc--modal .skcc-banner__inner {
	padding: 24px;
}

#skcc.skcc--box .skcc-actions,
#skcc.skcc--modal .skcc-actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	margin-top: 18px;
}

#skcc.skcc--box .skcc-btn--settings,
#skcc.skcc--modal .skcc-btn--settings {
	grid-column: 1 / -1;
	order: 3;
}

/* ---------- Rozloženie: modálne okno ---------- */

#skcc.skcc--modal .skcc-banner {
	top: 50%;
	left: 50%;
	width: calc(100% - 32px);
	max-width: 540px;
	max-height: calc(100vh - 32px);
	overflow-y: auto;
	border-radius: calc(var(--skcc-radius) + 6px);
	transform: translate(-50%, -50%);
	animation: skcc-pop 0.3s ease-out both;
}

#skcc .skcc-backdrop {
	position: fixed;
	inset: 0;
	z-index: calc(var(--skcc-z) - 1);
	background: rgba(15, 23, 42, 0.55);
	animation: skcc-fade 0.25s ease-out both;
}

/* ---------- Nastavenia ---------- */

#skcc .skcc-prefs {
	position: fixed;
	inset: 0;
	z-index: calc(var(--skcc-z) + 2);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

#skcc .skcc-prefs__dialog {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 680px;
	max-height: min(88vh, 780px);
	background: var(--skcc-bg);
	color: var(--skcc-text);
	border-radius: calc(var(--skcc-radius) + 6px);
	box-shadow: var(--skcc-shadow);
	animation: skcc-pop-static 0.25s ease-out both;
}

#skcc .skcc-prefs__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 18px 24px;
	border-bottom: 1px solid var(--skcc-line);
}

#skcc .skcc-prefs__header .skcc-title {
	margin: 0;
}

#skcc .skcc-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	margin: 0 -8px 0 0;
	padding: 0;
	background: transparent;
	border: 0;
	border-radius: var(--skcc-radius);
	color: inherit;
	cursor: pointer;
}

#skcc .skcc-close:hover {
	background: var(--skcc-secondary);
}

#skcc .skcc-prefs__body {
	flex: 1 1 auto;
	overflow-y: auto;
	padding: 20px 24px;
	overscroll-behavior: contain;
}

#skcc .skcc-prefs__footer {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	padding: 16px 24px;
	border-top: 1px solid var(--skcc-line);
}

#skcc .skcc-prefs__footer .skcc-btn {
	flex: 1 1 160px;
}

/* ---------- Kategórie ---------- */

#skcc .skcc-cat {
	margin-top: 12px;
	border: 1px solid var(--skcc-line);
	border-radius: var(--skcc-radius);
}

#skcc .skcc-cat__head {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
}

#skcc .skcc-cat__expand {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 40px;
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	font-weight: 600;
	text-align: left;
	text-transform: none;
	color: inherit;
	cursor: pointer;
}

#skcc .skcc-cat__chevron {
	width: 8px;
	height: 8px;
	border-right: 2px solid currentColor;
	border-bottom: 2px solid currentColor;
	transform: rotate(-45deg);
	transition: transform 0.2s ease;
}

#skcc .skcc-cat__expand[aria-expanded="true"] .skcc-cat__chevron {
	transform: rotate(45deg);
}

#skcc .skcc-cat__always {
	font-size: 0.85em;
	font-weight: 600;
	color: var(--skcc-toggle);
	white-space: nowrap;
}

#skcc .skcc-cat__details {
	padding: 0 16px 16px 36px;
}

/* ---------- Prepínač ---------- */

#skcc .skcc-switch {
	position: relative;
	flex: 0 0 auto;
	display: inline-block;
	width: 46px;
	height: 26px;
}

#skcc .skcc-switch__input {
	position: absolute;
	inset: 0;
	z-index: 1;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
}

#skcc .skcc-switch__track {
	position: absolute;
	inset: 0;
	background: rgba(127, 127, 127, 0.45);
	background: color-mix(in srgb, var(--skcc-text) 30%, var(--skcc-bg));
	border-radius: 26px;
	transition: background 0.2s ease;
}

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

#skcc .skcc-switch__input:checked + .skcc-switch__track {
	background: var(--skcc-toggle);
}

#skcc .skcc-switch__input:checked + .skcc-switch__track::after {
	transform: translateX(20px);
}

/* ---------- Tabuľka cookies ---------- */

.skcc-table-wrap {
	overflow-x: auto;
	margin-top: 12px;
}

.skcc-table {
	width: 100%;
	margin: 0;
	border-collapse: collapse;
	font-size: 0.85em;
	line-height: 1.45;
}

.skcc-table th,
.skcc-table td {
	padding: 7px 10px 7px 0;
	border: 0;
	border-bottom: 1px solid rgba(127, 127, 127, 0.25);
	text-align: left;
	vertical-align: top;
	background: none;
}

.skcc-table th {
	font-weight: 600;
	white-space: nowrap;
}

/* ---------- Plávajúce tlačidlo ---------- */

#skcc .skcc-revisit {
	position: fixed;
	bottom: 20px;
	z-index: calc(var(--skcc-z) - 2);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	margin: 0;
	padding: 0;
	background: var(--skcc-primary);
	color: var(--skcc-primary-text);
	border: 0;
	border-radius: 50%;
	box-shadow: 0 4px 14px rgba(15, 23, 42, 0.25);
	cursor: pointer;
	transition: transform 0.15s ease;
}

#skcc.skcc--revisit-bottom-left .skcc-revisit { left: 20px; }
#skcc.skcc--revisit-bottom-right .skcc-revisit { right: 20px; }

#skcc .skcc-revisit:hover {
	transform: scale(1.06);
}

/* Odkaz zo shortcodu [skcc_settings] */
.skcc-settings-link {
	margin: 0;
	padding: 0;
	background: none;
	border: 0;
	font: inherit;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

/* ---------- Zablokované vložené prvky ---------- */

.skcc-embed {
	position: relative;
	display: block;
	width: 100%;
	min-height: 220px;
}

.skcc-embed iframe[data-skcc-src] {
	visibility: hidden;
}

.wp-block-embed__wrapper > .skcc-embed,
.elementor-video-wrapper > .skcc-embed,
.fluid-width-video-wrapper > .skcc-embed {
	position: absolute;
	inset: 0;
	min-height: 0;
}

.skcc-embed__notice {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: var(--skcc-secondary, #eef2f6);
	color: var(--skcc-secondary-text, #1d2330);
	border-radius: var(--skcc-radius, 8px);
	text-align: center;
	font-size: 15px;
	line-height: 1.5;
}

.skcc-embed__inner {
	max-width: 440px;
}

.skcc-embed__inner p {
	margin: 0 0 14px;
}

.skcc-embed__link {
	display: block;
	margin: 10px auto 0;
	padding: 4px;
	background: none;
	border: 0;
	font: inherit;
	font-size: 0.9em;
	color: inherit;
	text-decoration: underline;
	cursor: pointer;
}

.skcc-embed--loaded {
	min-height: 0;
}

.skcc-embed--loaded .skcc-embed__notice {
	display: none;
}

.skcc-embed--loaded iframe {
	visibility: visible;
}

/* ---------- Animácie ---------- */

@keyframes skcc-bar-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes skcc-bar-down { from { transform: translateY(-100%); } to { transform: none; } }
@keyframes skcc-fade-up { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes skcc-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes skcc-pop { from { opacity: 0; transform: translate(-50%, -46%); } to { opacity: 1; transform: translate(-50%, -50%); } }
@keyframes skcc-pop-static { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (prefers-reduced-motion: reduce) {
	#skcc *,
	#skcc .skcc-banner {
		animation: none !important;
		transition: none !important;
	}
}

/* ---------- Mobil ---------- */

@media (max-width: 860px) {
	#skcc.skcc--bar .skcc-banner__inner {
		flex-direction: column;
		align-items: stretch;
		gap: 16px;
		padding: 18px;
	}

	#skcc.skcc--bar .skcc-actions {
		display: grid;
		grid-template-columns: 1fr 1fr;
	}

	#skcc.skcc--bar .skcc-btn--settings {
		grid-column: 1 / -1;
		order: 3;
	}
}

@media (max-width: 480px) {
	#skcc.skcc--box .skcc-banner {
		right: 10px;
		left: 10px;
		bottom: 10px;
		width: auto;
		max-width: none;
	}

	#skcc .skcc-prefs {
		align-items: flex-end;
		padding: 0;
	}

	#skcc .skcc-prefs__dialog {
		max-height: 92vh;
		border-radius: calc(var(--skcc-radius) + 6px) calc(var(--skcc-radius) + 6px) 0 0;
	}

	#skcc .skcc-prefs__header,
	#skcc .skcc-prefs__body,
	#skcc .skcc-prefs__footer {
		padding-left: 18px;
		padding-right: 18px;
	}

	#skcc .skcc-cat__details {
		padding-left: 16px;
	}
}

@media print {
	#skcc { display: none !important; }
}
