/* Studio Cookie Consent – frontend. Barvy a rozměry se doplňují z nastavení jako CSS proměnné (.scc). */

.scc,
.scc *,
.scc-reopen,
.scc-embed-ph,
.scc-embed-ph * {
	box-sizing: border-box;
}

[hidden].scc,
.scc [hidden],
.scc-reopen[hidden] {
	display: none !important;
}

/* ---------- Kořen a překrytí ---------- */

.scc {
	position: fixed;
	inset: 0;
	z-index: var(--scc-z, 999999);
	display: flex;
	pointer-events: none;
	font-family: var(--scc-font, inherit);
	font-size: var(--scc-font-size, 15px);
	line-height: 1.6;
	color: var(--scc-text, #1f2330);
	-webkit-font-smoothing: antialiased;
	text-align: left;
}

.scc--pos-center       { align-items: center;   justify-content: center; }
.scc--pos-bottom       { align-items: flex-end; justify-content: center; }
.scc--pos-top          { align-items: flex-start; justify-content: center; }
.scc--pos-bottom-left  { align-items: flex-end; justify-content: flex-start; }
.scc--pos-bottom-right { align-items: flex-end; justify-content: flex-end; }

.scc-overlay {
	display: none;
	position: absolute;
	inset: 0;
	background: var(--scc-overlay, rgba(11, 16, 32, .45));
	opacity: 0;
	transition: opacity .25s ease;
}

.scc--has-overlay .scc-overlay {
	display: block;
	pointer-events: auto;
}

.scc--visible .scc-overlay {
	opacity: 1;
}

html.scc-lock,
html.scc-lock body {
	overflow: hidden !important;
}

/* ---------- Okno ---------- */

.scc-dialog {
	position: relative;
	pointer-events: auto;
	margin: 16px;
	width: min(var(--scc-width, 640px), calc(100vw - 32px));
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	overflow-y: auto;
	overscroll-behavior: contain;
	padding: var(--scc-padding, 40px);
	background: var(--scc-bg, #fff);
	color: var(--scc-text, #1f2330);
	border-radius: var(--scc-radius, 22px);
	box-shadow: var(--scc-shadow, none);
	outline: none;
}

.scc--anim-fade:not(.scc--visible) .scc-dialog {
	opacity: 0;
	transform: translateY(14px) scale(.985);
}

.scc--anim-fade .scc-dialog {
	transition: opacity .25s ease, transform .25s ease;
}

.scc-title {
	margin: 0 0 1.5em;
	padding: 0 36px;
	font-family: inherit;
	font-size: var(--scc-title-size, 18px);
	font-weight: 400;
	letter-spacing: .02em;
	line-height: 1.3;
	text-align: var(--scc-title-align, center);
	text-transform: none;
	color: var(--scc-title, #1f2330);
}

.scc--pos-bottom-left .scc-title,
.scc--pos-bottom-right .scc-title {
	margin-bottom: 1em;
}

.scc-text {
	text-align: var(--scc-text-align, left);
	letter-spacing: .015em;
}

.scc-text p {
	margin: 0 0 .8em;
}

.scc-text > :last-child {
	margin-bottom: 0;
}

.scc-text a {
	color: var(--scc-link, #1c2a64);
}

/* ---------- Zavírací křížek ---------- */

.scc .scc-close {
	position: absolute;
	top: calc(var(--scc-padding, 40px) * .5);
	right: calc(var(--scc-padding, 40px) * .6);
	display: grid;
	place-items: center;
	width: 34px;
	height: 34px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: none;
	box-shadow: none;
	color: var(--scc-close, #1f2330);
	cursor: pointer;
	line-height: 1;
	z-index: 2;
}

.scc .scc-close:hover {
	background: rgba(128, 128, 128, .14);
}

/* ---------- Tlačítka ---------- */

.scc-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 2em;
}

.scc-btn.scc-btn {
	flex: 1 1 0;
	min-width: 130px;
	height: var(--scc-btn-height, 46px);
	margin: 0;
	padding: 0 18px;
	border: 1px solid;
	border-radius: var(--scc-btn-radius, 999px);
	box-shadow: none;
	text-shadow: none;
	text-transform: none;
	letter-spacing: normal;
	font-family: inherit;
	font-size: 1em;
	font-weight: 500;
	line-height: 1.2;
	text-align: center;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: filter .15s ease, transform .05s ease;
}

.scc-btn.scc-btn:hover {
	filter: brightness(.94);
}

.scc-btn.scc-btn:active {
	transform: translateY(1px);
}

.scc-btn--accept.scc-btn { background: var(--scc-accept-bg); color: var(--scc-accept-color); border-color: var(--scc-accept-border); }
.scc-btn--reject.scc-btn { background: var(--scc-reject-bg); color: var(--scc-reject-color); border-color: var(--scc-reject-border); }
.scc-btn--prefs.scc-btn  { background: var(--scc-prefs-bg);  color: var(--scc-prefs-color);  border-color: var(--scc-prefs-border); }
.scc-btn--save.scc-btn   { background: var(--scc-save-bg);   color: var(--scc-save-color);   border-color: var(--scc-save-border); }

.scc--btns-stack .scc-buttons {
	flex-direction: column;
}

.scc--btns-stack .scc-btn.scc-btn {
	flex: none;
	width: 100%;
}

.scc-btn:focus-visible,
.scc-close:focus-visible,
.scc-reopen:focus-visible,
.scc-links a:focus-visible,
.scc-details summary:focus-visible {
	outline: 2px solid var(--scc-accent, #1c2a64);
	outline-offset: 2px;
}

/* ---------- Odkazy ---------- */

.scc .scc-links {
	display: flex;
	flex-wrap: wrap;
	gap: 4px 22px;
	justify-content: var(--scc-links-justify, center);
	margin: 1.7em 0 0;
	padding: 0;
	list-style: none;
}

.scc .scc-links li {
	margin: 0;
	padding: 0;
	list-style: none;
	font-size: .95em;
}

.scc .scc-links li::before,
.scc .scc-links li::marker {
	content: none;
	display: none;
}

.scc .scc-links a {
	color: var(--scc-link, #1c2a64);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.scc .scc-links a:hover {
	text-decoration-thickness: 2px;
}

/* ---------- Předvolby ---------- */

.scc-cats {
	margin-top: 1.4em;
	border-top: 1px solid rgba(128, 128, 128, .25);
}

.scc-cat {
	padding: 14px 0;
	border-bottom: 1px solid rgba(128, 128, 128, .25);
}

.scc-cat-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.scc-cat-label {
	font-weight: 600;
}

.scc-always {
	font-size: .85em;
	font-weight: 600;
	color: var(--scc-accent, #1c2a64);
	white-space: nowrap;
}

.scc-cat-desc {
	margin-top: 6px;
	font-size: .92em;
	opacity: .85;
}

.scc-switch {
	position: relative;
	display: inline-block;
	flex: none;
	width: 46px;
	height: 26px;
	margin: 0;
}

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

.scc-slider {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #c5c9d4;
	transition: background .2s ease;
}

.scc-slider::before {
	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, .3);
	transition: transform .2s ease;
}

.scc-switch input:checked + .scc-slider {
	background: var(--scc-accent, #1c2a64);
}

.scc-switch input:checked + .scc-slider::before {
	transform: translateX(20px);
}

.scc-switch input:focus-visible + .scc-slider {
	outline: 2px solid var(--scc-accent, #1c2a64);
	outline-offset: 2px;
}

.scc-details {
	margin-top: 8px;
	font-size: .88em;
}

.scc-details summary {
	cursor: pointer;
	color: var(--scc-link, #1c2a64);
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* ---------- Tabulka cookies (lišta i shortcode) ---------- */

.scc-table {
	display: block;
	width: 100%;
	margin: 8px 0 0;
	overflow-x: auto;
	border-collapse: collapse;
	font-size: .92em;
}

.scc-table th,
.scc-table td {
	padding: 6px 10px 6px 0;
	border-bottom: 1px solid rgba(128, 128, 128, .22);
	text-align: left;
	vertical-align: top;
}

.scc-table th {
	font-weight: 600;
}

.scc-table code {
	font-size: .95em;
	background: none;
	padding: 0;
	word-break: break-all;
}

/* ---------- Plovoucí tlačítko pro znovuotevření ---------- */

.scc-reopen {
	position: fixed;
	bottom: 16px;
	z-index: calc(var(--scc-z, 999999) - 1);
	display: grid;
	place-items: center;
	width: 46px;
	height: 46px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--scc-reopen-bg, #1c2a64);
	color: var(--scc-reopen-color, #fff);
	box-shadow: 0 4px 14px rgba(0, 0, 0, .28);
	cursor: pointer;
	transition: transform .15s ease;
}

.scc-reopen:hover {
	transform: scale(1.07);
}

.scc-reopen--left  { left: 16px; }
.scc-reopen--right { right: 16px; }

/* ---------- Zástupný prvek za blokovaný obsah (YouTube, mapy…) ---------- */

iframe[data-scc-src] {
	display: none !important;
}

.scc-embed-ph {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 14px;
	width: 100%;
	min-height: 220px;
	padding: 24px;
	background: #eef0f4;
	border-radius: 12px;
	color: #1f2330;
	font-family: var(--scc-font, inherit);
	font-size: 15px;
	line-height: 1.5;
	text-align: center;
}

.scc-embed-ph--fill {
	position: absolute;
	inset: 0;
	min-height: 0;
	border-radius: 0;
}

.scc-embed-ph .scc-btn.scc-btn {
	flex: none;
	min-width: 0;
}

/* Tlačítko vložené shortcodem [scc_settings_link] (mimo banner). */
.scc-link-wrap {
	display: block;
	margin: 1em 0;
}

.scc-btn.scc-link-btn {
	display: inline-block;
	flex: none;
	min-width: 0;
	width: auto;
	height: var(--scc-btn-height, 46px);
	padding: 0 24px;
	font-size: 15px;
}

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

@media (max-width: 600px) {
	.scc-dialog {
		padding: calc(var(--scc-padding, 40px) * .6);
	}

	.scc-buttons {
		flex-direction: column;
	}

	.scc-btn.scc-btn {
		flex: none;
		width: 100%;
	}

	.scc-title {
		padding: 0 30px;
	}

	.scc-close {
		top: 10px;
		right: 10px;
	}
}

/* ---------- Náhled v administraci ---------- */

.scc--preview {
	position: relative;
	inset: auto;
	z-index: auto;
	width: 100%;
	min-height: 640px;
	overflow: hidden;
	border-radius: 6px;
}

.scc--preview .scc-overlay {
	transition: none;
}

.scc--preview .scc-dialog {
	width: min(var(--scc-width, 640px), calc(100% - 32px));
	max-height: none;
	overflow: visible;
	transition: none;
}

.scc-reopen--preview {
	position: absolute;
	bottom: 16px;
	z-index: 5;
}

@media (prefers-reduced-motion: reduce) {
	.scc *,
	.scc-reopen {
		transition: none !important;
	}
}
