/* Kodnes Cookie Notice – nevtralna pasica. Barve prek CSS spremenljivk, tipografija se deduje od teme. */
.kcn, .kcn *, .kcn-ph, .kcn-ph * { box-sizing: border-box; }
.kcn[hidden], .kcn [hidden] { display: none !important; }

.kcn {
	--kcn-shadow: 0 10px 40px rgba(0, 0, 0, .18);
	font-family: inherit;
	font-size: 15px;
	line-height: 1.5;
	color: var(--kcn-text);
	letter-spacing: normal;
	text-align: left;
}

/* ---------- Pasica ---------- */
.kcn-banner { position: fixed; z-index: 2147483000; }
.kcn-banner:focus { outline: none; }
.kcn-box {
	position: relative;
	background: var(--kcn-bg);
	color: var(--kcn-text);
	border: 1px solid var(--kcn-border);
	border-radius: var(--kcn-radius);
	box-shadow: var(--kcn-shadow);
	padding: 20px 22px;
	animation: kcn-in .25s ease-out;
}
.kcn-layout-box-left { left: 16px; bottom: 16px; width: calc(100% - 32px); max-width: 440px; }
.kcn-layout-box-right { right: 16px; bottom: 16px; width: calc(100% - 32px); max-width: 440px; }
.kcn-layout-bar { left: 0; right: 0; bottom: 0; }
.kcn-layout-bar .kcn-box { border-radius: 0; border-width: 1px 0 0; padding: 18px max(20px, calc((100% - 1200px) / 2)); display: grid; grid-template-columns: 1fr auto; gap: 4px 32px; align-items: center; }
.kcn-layout-bar .kcn-title { grid-column: 1; }
.kcn-layout-bar .kcn-text { grid-column: 1; margin-bottom: 0; }
.kcn-layout-bar .kcn-actions { grid-column: 2; grid-row: 1 / span 2; }
.kcn-layout-modal { inset: 0; display: flex; align-items: center; justify-content: center; padding: 16px; }
.kcn-layout-modal .kcn-box { width: 100%; max-width: 520px; }

.kcn-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .5); }
.kcn-layout-modal .kcn-overlay { position: absolute; }

.kcn-title { font-family: inherit; font-size: 1.15em; font-weight: 700; line-height: 1.3; margin: 0 0 8px; padding: 0; color: inherit; text-transform: none; letter-spacing: normal; }
.kcn-text { margin: 0 0 16px; font-size: .95em; color: inherit; }
.kcn-link, .kcn a { color: var(--kcn-link); text-decoration: underline; text-underline-offset: 2px; }

.kcn-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.kcn-actions .kcn-btn { flex: 1 1 0; }

.kcn-btn {
	font-family: inherit;
	font-size: .95em;
	font-weight: 600;
	line-height: 1.2;
	min-height: 44px;
	padding: 10px 16px;
	border-radius: calc(var(--kcn-radius) * .75);
	border: 1px solid transparent;
	cursor: pointer;
	white-space: nowrap;
	text-transform: none;
	letter-spacing: normal;
	box-shadow: none;
	transition: filter .15s, background-color .15s;
}
.kcn-btn-primary { background: var(--kcn-primary); color: var(--kcn-primary-text); border-color: var(--kcn-primary); }
.kcn-btn-secondary { background: var(--kcn-secondary); color: var(--kcn-secondary-text); border-color: var(--kcn-border); }
.kcn-btn:hover { filter: brightness(.92); }
.kcn-btn:focus-visible, .kcn-x:focus-visible, .kcn-float:focus-visible, .kcn a:focus-visible, .kcn summary:focus-visible, .kcn-switch input:focus-visible + .kcn-slider {
	outline: 3px solid var(--kcn-primary);
	outline-offset: 2px;
}

.kcn-x {
	position: absolute; top: 8px; right: 8px;
	width: 36px; height: 36px; padding: 0;
	background: transparent; border: 0; border-radius: 50%;
	color: inherit; font-size: 24px; line-height: 1; cursor: pointer;
}
.kcn-x:hover { background: var(--kcn-secondary); }

/* ---------- Okno z nastavitvami ---------- */
.kcn-prefs { position: fixed; inset: 0; z-index: 2147483001; display: flex; align-items: center; justify-content: center; padding: 16px; }
.kcn-modal {
	position: relative;
	display: flex; flex-direction: column;
	width: 100%; max-width: 680px; max-height: min(88vh, 820px);
	background: var(--kcn-bg); color: var(--kcn-text);
	border-radius: var(--kcn-radius);
	box-shadow: var(--kcn-shadow);
	animation: kcn-in .2s ease-out;
}
.kcn-modal-head { position: relative; padding: 18px 56px 14px 22px; border-bottom: 1px solid var(--kcn-border); }
.kcn-modal-head .kcn-title { margin: 0; }
.kcn-modal-head .kcn-x { top: 12px; right: 12px; }
.kcn-modal-body { padding: 16px 22px; overflow-y: auto; overscroll-behavior: contain; }
.kcn-modal-foot { padding: 14px 22px; border-top: 1px solid var(--kcn-border); }

.kcn-gpc { padding: 10px 12px; border-radius: calc(var(--kcn-radius) * .5); background: var(--kcn-secondary); color: var(--kcn-secondary-text); font-size: .9em; }
.kcn-cat { padding: 14px 0; border-top: 1px solid var(--kcn-border); }
.kcn-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.kcn-cat-title { font-family: inherit; font-size: 1em; font-weight: 700; margin: 0; padding: 0; color: inherit; text-transform: none; }
.kcn-cat-desc { margin: 4px 0 0; font-size: .9em; opacity: .85; }
.kcn-always { font-size: .85em; font-weight: 600; opacity: .8; white-space: nowrap; }

.kcn-switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: 0 0 auto; cursor: pointer; }
.kcn-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; z-index: 1; }
.kcn-slider { position: absolute; inset: 0; border-radius: 26px; background: var(--kcn-border); transition: background .2s; }
.kcn-slider::before { content: ""; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); transition: transform .2s; }
.kcn-switch input:checked + .kcn-slider { background: var(--kcn-primary); }
.kcn-switch input:checked + .kcn-slider::before { transform: translateX(20px); background: var(--kcn-primary-text); }

.kcn-details { margin-top: 8px; font-size: .9em; }
.kcn-details summary { cursor: pointer; font-weight: 600; padding: 4px 0; }
.kcn-svc { margin: 8px 0 0; padding: 10px 12px; border-radius: calc(var(--kcn-radius) * .5); background: var(--kcn-secondary); color: var(--kcn-secondary-text); }
.kcn-svc-name { font-weight: 700; }
.kcn-svc-prov { font-weight: 400; opacity: .8; }
.kcn-svc-desc { margin-top: 2px; }
.kcn-table-wrap { overflow-x: auto; margin-top: 6px; }
.kcn-table { width: 100%; border-collapse: collapse; font-size: .92em; margin: 0; background: transparent; }
.kcn-table th, .kcn-table td { text-align: left; padding: 4px 8px 4px 0; border: 0; border-bottom: 1px solid var(--kcn-border); vertical-align: top; background: transparent; color: inherit; }
.kcn-table code { font-size: .95em; background: transparent; color: inherit; padding: 0; }
.kcn-id { margin: 14px 0 0; font-size: .8em; opacity: .7; word-break: break-all; }
.kcn-id code { background: transparent; color: inherit; padding: 0; }

/* ---------- Plavajoči gumb ---------- */
.kcn-float {
	position: fixed; bottom: 16px; z-index: 2147482999;
	width: 44px; height: 44px; padding: 0;
	display: inline-flex; align-items: center; justify-content: center;
	border-radius: 50%; border: 1px solid var(--kcn-border);
	background: var(--kcn-bg); color: var(--kcn-text);
	box-shadow: 0 4px 16px rgba(0,0,0,.18); cursor: pointer;
}
.kcn-float-left { left: 16px; }
.kcn-float-right { right: 16px; }

/* ---------- Placeholder za blokirano vsebino ---------- */
iframe.kcn-blocked { display: none !important; }
.kcn-ph {
	display: flex; align-items: center; justify-content: center;
	width: 100%; min-height: 200px; aspect-ratio: 16 / 9;
	padding: 20px; margin: 0 0 1em;
	background: var(--kcn-secondary, #f0f0f1); color: var(--kcn-secondary-text, #1d2327);
	border: 1px solid var(--kcn-border, #dcdcde); border-radius: var(--kcn-radius, 8px);
	font-family: inherit; font-size: 15px; line-height: 1.5; text-align: center;
}
.kcn-ph-inner { max-width: 460px; }
.kcn-ph p { margin: 0 0 12px; }
.kcn-ph p:last-child { margin: 0; }
.kcn-ph .kcn-btn { flex: none; }
.kcn-ph a { color: inherit; text-decoration: underline; margin-left: 8px; }

/* ---------- Tabela piškotkov (shortcode) ---------- */
.kcn-cookie-table table { width: 100%; border-collapse: collapse; margin: 0 0 1.5em; }
.kcn-cookie-table th, .kcn-cookie-table td { text-align: left; padding: 6px 10px; border: 1px solid rgba(0,0,0,.12); vertical-align: top; }

@media (max-width: 782px) {
	.kcn-layout-bar .kcn-box { display: block; }
	.kcn-layout-bar .kcn-text { margin-bottom: 14px; }
}
@media (max-width: 480px) {
	.kcn-layout-box-left, .kcn-layout-box-right { left: 8px; right: 8px; bottom: 8px; width: auto; }
	.kcn-actions { flex-direction: column-reverse; }
	.kcn-actions .kcn-btn { width: 100%; flex: none; }
	.kcn-prefs { padding: 0; align-items: flex-end; }
	.kcn-modal { max-height: 92vh; border-radius: var(--kcn-radius) var(--kcn-radius) 0 0; }
}
@media (prefers-reduced-motion: reduce) {
	.kcn-box, .kcn-modal { animation: none; }
	.kcn-slider, .kcn-slider::before, .kcn-btn { transition: none; }
}
@keyframes kcn-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
