/*!
 * SWA Kolačići 1.0.4 – Studio Web Art
 */

#swa-cc,
.swa-cc-reopen,
.swa-cc-testbar {
	font: 400 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
	color: var(--swa-cc-fg, #14171c);
	-webkit-font-smoothing: antialiased;
}

#swa-cc *,
#swa-cc *::before,
#swa-cc *::after,
.swa-cc-reopen * {
	box-sizing: border-box !important;
	font-family: inherit !important;
	letter-spacing: normal !important;
	text-transform: none !important;
}

#swa-cc[hidden],
#swa-cc [hidden],
.swa-cc-reopen[hidden] { display: none !important; }

.swa-cc-sr {
	position: absolute !important;
	width: 1px !important; height: 1px !important;
	padding: 0 !important; margin: -1px !important;
	overflow: hidden !important; clip: rect(0 0 0 0) !important;
	white-space: nowrap !important; border: 0 !important;
}

html.swa-cc-locked { overflow: hidden !important; }

/* ==========================================================================
   Prvi sloj – obavijest
   ========================================================================== */

#swa-cc .swa-cc-banner {
	position: fixed;
	z-index: var(--swa-cc-z, 99998);
	width: 420px;
	max-width: calc(100vw - 24px);
	max-height: calc(100vh - 24px);
	overflow-y: auto;
	padding: 20px !important;
	margin: 0 !important;
	background: var(--swa-cc-bg, #fff) !important;
	color: var(--swa-cc-fg, #14171c) !important;
	border: 1px solid #d4d8de !important;
	border-radius: var(--swa-cc-radius, 14px) !important;
	box-shadow: 0 18px 50px rgba(0, 0, 0, .3) !important;
}

#swa-cc[data-pos="bottom-left"]  .swa-cc-banner { left: 16px; bottom: 16px; }
#swa-cc[data-pos="bottom-right"] .swa-cc-banner { right: 16px; bottom: 16px; }
#swa-cc[data-pos="top-left"]     .swa-cc-banner { left: 16px; top: 16px; }
#swa-cc[data-pos="top-right"]    .swa-cc-banner { right: 16px; top: 16px; }

#swa-cc[data-layout="bar"] .swa-cc-banner {
	left: 0; right: 0; bottom: 0;
	width: 100%;
	max-width: none;
	border-radius: 0 !important;
	border-left: 0 !important; border-right: 0 !important; border-bottom: 0 !important;
	display: grid !important;
	grid-template-columns: 1fr auto;
	gap: 8px 24px;
	align-items: center;
	padding: 18px 24px !important;
}

#swa-cc[data-layout="bar"] .swa-cc-banner .swa-cc-actions { grid-row: span 3; }

#swa-cc[data-layout="center"] .swa-cc-banner {
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	width: 520px;
}

#swa-cc .swa-cc-h {
	margin: 0 0 8px !important;
	padding: 0 !important;
	font-size: 18px !important;
	font-weight: 700 !important;
	line-height: 1.3 !important;
	color: var(--swa-cc-fg, #14171c) !important;
}

#swa-cc .swa-cc-p {
	margin: 0 0 12px !important;
	padding: 0 !important;
	font-size: 14px !important;
	line-height: 1.6 !important;
	color: var(--swa-cc-fg, #14171c) !important;
}

#swa-cc .swa-cc-links {
	margin: 0 0 14px !important;
	padding: 0 !important;
	font-size: 13px !important;
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
}

#swa-cc .swa-cc-links a {
	color: var(--swa-cc-accent, #0b4fc4) !important;
	text-decoration: underline !important;
	font-weight: 600 !important;
}

/* --- Gumbi: "Prihvati sve" i "Odbij sve" su jednake veličine i težine --- */

#swa-cc .swa-cc-actions,
#swa-cc .swa-cc-prefs-foot {
	display: flex !important;
	flex-wrap: wrap;
	gap: 8px;
	align-items: stretch;
}

#swa-cc .swa-cc-btn {
	flex: 1 1 140px;
	min-height: 46px;
	padding: 12px 16px !important;
	margin: 0 !important;
	border: 2px solid transparent !important;
	border-radius: 10px !important;
	font-size: 14px !important;
	font-weight: 700 !important;
	line-height: 1.2 !important;
	text-align: center !important;
	cursor: pointer;
	transition: filter .15s ease;
}

#swa-cc .swa-cc-btn:hover { filter: brightness(.94); }

#swa-cc .swa-cc-btn:focus-visible,
#swa-cc .swa-cc-btn:focus,
#swa-cc .swa-cc-close:focus,
#swa-cc .swa-cc-switch input:focus + .swa-cc-switch-ui,
.swa-cc-reopen:focus {
	outline: 3px solid #ffb300 !important;
	outline-offset: 2px !important;
}

#swa-cc .swa-cc-btn-accept {
	background: var(--swa-cc-accent, #0b4fc4) !important;
	color: var(--swa-cc-accent-text, #fff) !important;
	border-color: var(--swa-cc-accent, #0b4fc4) !important;
}

#swa-cc .swa-cc-btn-reject {
	background: #2b3038 !important;
	color: #fff !important;
	border-color: #2b3038 !important;
}

#swa-cc .swa-cc-btn-save {
	background: transparent !important;
	color: var(--swa-cc-fg, #14171c) !important;
	border-color: #8b929c !important;
}

#swa-cc .swa-cc-btn-link {
	flex: 1 1 100%;
	min-height: 0;
	padding: 8px 4px !important;
	background: transparent !important;
	color: var(--swa-cc-fg, #14171c) !important;
	border: 0 !important;
	font-weight: 600 !important;
	text-decoration: underline !important;
}

/* Kategorije u prvom sloju */
#swa-cc .swa-cc-quick {
	display: grid !important;
	grid-template-columns: repeat(auto-fit, minmax(148px, 1fr));
	gap: 8px 16px;
	padding: 12px 0 14px !important;
	margin: 0 0 4px !important;
	border-top: 1px solid #e4e7ec !important;
	border-bottom: 1px solid #e4e7ec !important;
}

#swa-cc .swa-cc-switch-sm { font-size: 14px !important; gap: 8px; min-height: 32px; }
#swa-cc .swa-cc-switch-sm .swa-cc-switch-ui { width: 38px; height: 22px; }
#swa-cc .swa-cc-switch-sm .swa-cc-switch-ui::after { width: 16px; height: 16px; }
#swa-cc .swa-cc-switch-sm input:checked + .swa-cc-switch-ui::after { transform: translateX(16px); }

#swa-cc .swa-cc-detailslink {
	padding: 5px 0 !important;
	margin: 0 !important;
	border: 0 !important;
	background: transparent !important;
	color: var(--swa-cc-accent, #0b4fc4) !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	text-decoration: underline !important;
	cursor: pointer;
}

#swa-cc .swa-cc-detailslink:focus { outline: 3px solid #ffb300 !important; outline-offset: 2px !important; }

/* ==========================================================================
   Drugi sloj – postavke
   ========================================================================== */

#swa-cc .swa-cc-backdrop {
	position: fixed;
	inset: 0;
	z-index: calc(var(--swa-cc-z, 99998) + 1);
	background: rgba(0, 0, 0, .55);
}

#swa-cc .swa-cc-prefs:not([hidden]) {
	position: fixed;
	z-index: calc(var(--swa-cc-z, 99998) + 2);
	left: 50%; top: 50%;
	transform: translate(-50%, -50%);
	width: 640px;
	max-width: calc(100vw - 24px);
	max-height: calc(100vh - 32px);
	display: flex !important;
	flex-direction: column !important;
	background: var(--swa-cc-bg, #fff) !important;
	color: var(--swa-cc-fg, #14171c) !important;
	border-radius: var(--swa-cc-radius, 14px) !important;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .4) !important;
	overflow: hidden;
}

#swa-cc .swa-cc-prefs:focus { outline: none !important; }

#swa-cc .swa-cc-prefs-head {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 12px;
	padding: 16px 20px !important;
	background: var(--swa-cc-accent, #0b4fc4) !important;
	flex: 0 0 auto;
}

#swa-cc .swa-cc-prefs-head .swa-cc-h {
	margin: 0 !important;
	color: var(--swa-cc-accent-text, #fff) !important;
}

#swa-cc .swa-cc-close {
	width: 36px !important; height: 36px !important;
	flex: 0 0 auto;
	padding: 0 !important; margin: 0 !important;
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	border: 2px solid rgba(255, 255, 255, .6) !important;
	border-radius: 8px !important;
	background: transparent !important;
	color: var(--swa-cc-accent-text, #fff) !important;
	cursor: pointer;
}

#swa-cc .swa-cc-close svg { width: 18px; height: 18px; display: block; pointer-events: none; }
#swa-cc .swa-cc-close:hover { background: rgba(255, 255, 255, .18) !important; }

#swa-cc .swa-cc-prefs-body {
	padding: 18px 20px !important;
	overflow-y: auto;
	flex: 1 1 auto;
}

#swa-cc .swa-cc-prefs-foot {
	padding: 14px 20px !important;
	border-top: 1px solid #e4e7ec !important;
	background: #f7f8fa !important;
	flex: 0 0 auto;
}

/* --- Kategorije --- */

#swa-cc .swa-cc-cat {
	padding: 14px 0 !important;
	border-top: 1px solid #e4e7ec !important;
}

#swa-cc .swa-cc-cat-head {
	display: flex !important;
	align-items: center !important;
	justify-content: space-between !important;
	gap: 12px;
}

#swa-cc .swa-cc-badge {
	font-size: 12px !important;
	font-weight: 700 !important;
	color: #5b6270 !important;
	background: #eef0f3;
	border-radius: 999px;
	padding: 4px 10px;
	white-space: nowrap;
}

#swa-cc .swa-cc-cat-desc {
	margin: 6px 0 0 !important;
	padding: 0 !important;
	font-size: 13px !important;
	line-height: 1.55 !important;
	color: #4a515c !important;
}

/* Prekidač */
#swa-cc .swa-cc-switch {
	display: inline-flex !important;
	align-items: center !important;
	gap: 10px;
	margin: 0 !important;
	cursor: pointer;
	font-size: 15px !important;
	font-weight: 700 !important;
	color: var(--swa-cc-fg, #14171c) !important;
}

#swa-cc .swa-cc-switch input {
	position: absolute;
	opacity: 0;
	width: 1px; height: 1px;
	margin: 0;
}

#swa-cc .swa-cc-switch-ui {
	position: relative;
	flex: 0 0 auto;
	width: 46px; height: 26px;
	border-radius: 999px;
	background: #b6bcc6;
	transition: background .15s ease;
}

#swa-cc .swa-cc-switch-ui::after {
	content: "";
	position: absolute;
	top: 3px; left: 3px;
	width: 20px; height: 20px;
	border-radius: 50%;
	background: #fff;
	transition: transform .15s ease;
}

#swa-cc .swa-cc-switch input:checked + .swa-cc-switch-ui { background: var(--swa-cc-accent, #0b4fc4); }
#swa-cc .swa-cc-switch input:checked + .swa-cc-switch-ui::after { transform: translateX(20px); }
#swa-cc .swa-cc-switch input:disabled + .swa-cc-switch-ui { background: #8b929c; opacity: .7; }
/* Nužna kategorija je zaključana, ali mora izgledati uključeno. */
#swa-cc .swa-cc-switch input:checked:disabled + .swa-cc-switch-ui { background: var(--swa-cc-accent, #0b4fc4); opacity: .55; }
#swa-cc .swa-cc-switch input:disabled ~ .swa-cc-switch-label { cursor: default; }

/* Tablica kolačića */
#swa-cc .swa-cc-details { margin-top: 10px !important; }

#swa-cc .swa-cc-details > summary {
	cursor: pointer;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: var(--swa-cc-accent, #0b4fc4) !important;
	list-style: none;
	padding: 4px 0 !important;
}

#swa-cc .swa-cc-details > summary::-webkit-details-marker { display: none; }

#swa-cc .swa-cc-table-wrap { overflow-x: auto; margin-top: 6px; }

#swa-cc .swa-cc-table {
	width: 100%;
	border-collapse: collapse !important;
	font-size: 12.5px !important;
	min-width: 460px;
}

#swa-cc .swa-cc-table th,
#swa-cc .swa-cc-table td {
	border: 1px solid #e4e7ec !important;
	padding: 7px 9px !important;
	text-align: left !important;
	vertical-align: top;
	color: var(--swa-cc-fg, #14171c) !important;
	background: transparent !important;
}

#swa-cc .swa-cc-table th { background: #f7f8fa !important; font-weight: 700 !important; }

#swa-cc .swa-cc-controller {
	margin: 16px 0 0 !important;
	font-size: 12px !important;
	color: #5b6270 !important;
}

/* ==========================================================================
   Gumb za ponovno otvaranje
   ========================================================================== */

.swa-cc-reopen {
	position: fixed;
	z-index: var(--swa-cc-z, 99998);
	display: inline-flex !important;
	align-items: center !important;
	gap: 8px;
	padding: 9px 14px !important;
	margin: 0 !important;
	border: 2px solid #d4d8de !important;
	border-radius: 999px !important;
	background: #fff !important;
	color: #14171c !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	line-height: 1 !important;
	cursor: pointer;
	box-shadow: 0 4px 14px rgba(0, 0, 0, .18) !important;
}

.swa-cc-reopen svg { width: 18px; height: 18px; display: block; flex: 0 0 auto; }
.swa-cc-reopen:hover { border-color: #9aa2ae !important; }

.swa-cc-reopen[data-pos="bottom-left"]  { left: 16px;  bottom: 16px; }
.swa-cc-reopen[data-pos="bottom-right"] { right: 16px; bottom: 16px; }
.swa-cc-reopen[data-pos="top-left"]     { left: 16px;  top: 16px; }
.swa-cc-reopen[data-pos="top-right"]    { right: 16px; top: 16px; }

.swa-cc-inline-trigger {
	display: inline-block;
	padding: 8px 14px;
	border: 2px solid currentColor;
	border-radius: 8px;
	background: transparent;
	font-weight: 600;
	cursor: pointer;
}

.swa-cc-testbar {
	position: fixed;
	left: 0; right: 0; top: 0;
	z-index: 2147483000;
	padding: 8px 16px;
	background: #b32d00;
	color: #fff;
	font-size: 13px;
	font-weight: 700;
	text-align: center;
}

/* ==========================================================================
   Blokirani ugrađeni sadržaj
   ========================================================================== */

.swa-cc-embed {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	max-width: 100%;
	min-height: 180px;
	padding: 20px;
	background: #f2f4f7;
	border: 1px dashed #9aa2ae;
	border-radius: 10px;
	font: 400 14px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
	color: #14171c;
	text-align: center;
}

.swa-cc-embed-inner { max-width: 440px; }

.swa-cc-embed-title { display: block; font-size: 15px; font-weight: 700; margin-bottom: 6px; }
.swa-cc-embed-text  { margin: 0 0 12px; font-size: 13px; line-height: 1.55; color: #4a515c; }

.swa-cc-embed-btn {
	padding: 10px 18px;
	border: 2px solid var(--swa-cc-accent, #0b4fc4);
	border-radius: 8px;
	background: var(--swa-cc-accent, #0b4fc4);
	color: var(--swa-cc-accent-text, #fff);
	font-size: 14px;
	font-weight: 700;
	cursor: pointer;
}

.swa-cc-embed-btn:focus { outline: 3px solid #ffb300; outline-offset: 2px; }

.swa-cc-embed-always {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin-top: 10px;
	font-size: 12.5px;
	color: #4a515c;
	cursor: pointer;
}

/* ==========================================================================
   Uže širine
   ========================================================================== */

@media (max-width: 640px) {
	#swa-cc .swa-cc-banner,
	#swa-cc[data-layout="center"] .swa-cc-banner {
		left: 8px !important;
		right: 8px !important;
		bottom: 8px !important;
		top: auto !important;
		width: auto !important;
		max-width: none !important;
		transform: none !important;
	}

	#swa-cc[data-layout="bar"] .swa-cc-banner {
		left: 0 !important; right: 0 !important; bottom: 0 !important;
		grid-template-columns: 1fr;
	}

	#swa-cc .swa-cc-btn { flex: 1 1 100%; }
	#swa-cc .swa-cc-prefs { max-height: calc(100vh - 16px); }
	.swa-cc-reopen span { display: none; }
	.swa-cc-reopen { padding: 10px !important; }
}

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

@supports (height: 100dvh) {
	#swa-cc .swa-cc-banner { max-height: calc(100dvh - 24px); }
	#swa-cc .swa-cc-prefs:not([hidden]) { max-height: calc(100dvh - 32px); }
}

@media print {
	#swa-cc, .swa-cc-reopen, .swa-cc-testbar { display: none !important; }
}

/* Mora ostati na kraju datoteke: nadjačava sva pravila s display koja imaju
   jednaku specifičnost, pa skriveni dijelovi ostaju skriveni. */
#swa-cc[hidden],
#swa-cc [hidden],
.swa-cc-reopen[hidden],
.swa-cc-embed[hidden] { display: none !important; }
