/* Goldspot Cookie Consent – https://goldspot.no/ */

#gscc-root,
.gscc-floating,
.gscc-embed {
	--gscc-primary: #1d1d1b;
	--gscc-primary-text: #fff;
	--gscc-bg: #fff;
	--gscc-text: #1d1d1b;
	--gscc-radius: 10px;
	--gscc-z: 2147483000;
	--gscc-shadow: 0 10px 40px rgba(0, 0, 0, .18), 0 2px 8px rgba(0, 0, 0, .08);
}

#gscc-root[hidden],
#gscc-root [hidden],
.gscc-floating[hidden] { display: none !important; }

#gscc-root,
#gscc-root * { box-sizing: border-box; }

#gscc-root {
	font-size: 15px;
	line-height: 1.5;
	color: var(--gscc-text);
	-webkit-font-smoothing: antialiased;
}

/* ---------- Banner ---------- */

.gscc-banner {
	position: fixed;
	z-index: var(--gscc-z);
	background: var(--gscc-bg);
	color: var(--gscc-text);
	box-shadow: var(--gscc-shadow);
	padding: 24px;
	outline: none;
	animation: gscc-in .25s ease-out;
}

.gscc--box-left .gscc-banner,
.gscc--box-right .gscc-banner {
	bottom: 20px;
	width: min(440px, calc(100vw - 40px));
	border-radius: var(--gscc-radius);
}
.gscc--box-left .gscc-banner { left: 20px; }
.gscc--box-right .gscc-banner { right: 20px; }

.gscc--bar .gscc-banner {
	left: 0;
	right: 0;
	bottom: 0;
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 8px 32px;
	align-items: center;
	padding: 20px max(24px, calc((100vw - 1200px) / 2));
}
.gscc--bar .gscc-title { grid-column: 1; }
.gscc--bar .gscc-desc { grid-column: 1; margin: 0; }
.gscc--bar .gscc-actions { grid-column: 2; grid-row: 1 / span 2; margin: 0; flex-wrap: nowrap; }

.gscc--center .gscc-banner {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: min(520px, calc(100vw - 32px));
	border-radius: var(--gscc-radius);
	animation: none;
}
.gscc-backdrop {
	position: fixed;
	inset: 0;
	z-index: calc(var(--gscc-z) - 1);
	background: rgba(0, 0, 0, .45);
}
.gscc--center .gscc-banner[hidden] + .gscc-backdrop,
.gscc--center .gscc-backdrop:has(+ .gscc-banner[hidden]) { display: none; }

#gscc-root .gscc-title {
	margin: 0 0 8px;
	padding: 0;
	font-family: inherit;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: 0;
	text-transform: none;
	color: inherit;
}
#gscc-root .gscc-desc { margin: 0 0 18px; font-size: 14px; color: inherit; opacity: .9; }
#gscc-root .gscc-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }

/* ---------- Knapper ---------- */

#gscc-root .gscc-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}
#gscc-root .gscc-btn,
.gscc-embed .gscc-btn {
	flex: 1 1 auto;
	min-height: 44px;
	margin: 0;
	padding: 10px 18px;
	border: 2px solid var(--gscc-primary);
	border-radius: calc(var(--gscc-radius) * .6);
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	letter-spacing: 0;
	text-transform: none;
	cursor: pointer;
	transition: opacity .15s, background-color .15s;
	box-shadow: none;
}
#gscc-root .gscc-btn--primary,
.gscc-embed .gscc-btn--primary { background: var(--gscc-primary); color: var(--gscc-primary-text); }
#gscc-root .gscc-btn--ghost { background: transparent; color: var(--gscc-text); border-color: currentColor; opacity: .85; }
#gscc-root .gscc-btn:hover,
.gscc-embed .gscc-btn:hover { opacity: .85; }
#gscc-root .gscc-btn:focus-visible,
#gscc-root .gscc-close:focus-visible,
#gscc-root input:focus-visible + .gscc-switch__track,
.gscc-floating:focus-visible,
.gscc-embed .gscc-btn:focus-visible { outline: 3px solid var(--gscc-primary); outline-offset: 2px; }

/* ---------- Innstillinger (modal) ---------- */

.gscc-modal {
	position: fixed;
	inset: 0;
	z-index: var(--gscc-z);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.gscc-modal__backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, .45); }
.gscc-modal__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	width: min(600px, 100%);
	max-height: calc(100vh - 32px);
	max-height: calc(100dvh - 32px);
	background: var(--gscc-bg);
	color: var(--gscc-text);
	border-radius: var(--gscc-radius);
	box-shadow: var(--gscc-shadow);
	outline: none;
	animation: gscc-in .2s ease-out;
}
.gscc-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 20px 24px 12px;
}
#gscc-root .gscc-modal__head .gscc-title { margin: 0; }
#gscc-root .gscc-close {
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
}
#gscc-root .gscc-close:hover { background: rgba(127, 127, 127, .15); }
.gscc-modal__body { overflow-y: auto; padding: 0 24px; }
.gscc-modal__foot { padding: 16px 24px 8px; border-top: 1px solid rgba(127, 127, 127, .2); }
.gscc-modal__meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 4px 24px 14px;
}
#gscc-root .gscc-modal__meta .gscc-link { font-size: 13px; }
#gscc-root .gscc-credit { margin-left: auto; font-size: 11px; color: inherit; text-decoration: none; opacity: .5; }

.gscc-cat { padding: 14px 0; border-top: 1px solid rgba(127, 127, 127, .2); }
.gscc-cat:first-child { border-top: 0; }
.gscc-cat__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
#gscc-root .gscc-cat__label { margin: 0; font-weight: 700; font-size: 15px; cursor: pointer; }
#gscc-root .gscc-cat__desc { margin: 4px 0 0; font-size: 13px; opacity: .85; }
#gscc-root .gscc-cat__services { margin: 6px 0 0; font-size: 12px; opacity: .65; }
#gscc-root .gscc-always { font-size: 12px; font-weight: 600; opacity: .7; white-space: nowrap; }

/* Bryter */
.gscc-switch { position: relative; flex: 0 0 auto; width: 46px; height: 26px; }
#gscc-root .gscc-switch input {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	margin: 0;
	opacity: 0;
	cursor: pointer;
	z-index: 1;
}
.gscc-switch__track {
	position: absolute;
	inset: 0;
	border-radius: 26px;
	background: rgba(127, 127, 127, .4);
	transition: background-color .2s;
}
.gscc-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, .3);
	transition: transform .2s;
}
.gscc-switch input:checked + .gscc-switch__track { background: var(--gscc-primary); }
.gscc-switch input:checked + .gscc-switch__track::after { transform: translateX(20px); }

/* ---------- Flytende knapp ---------- */

.gscc-floating {
	position: fixed;
	bottom: 16px;
	z-index: calc(var(--gscc-z) - 2);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: var(--gscc-primary);
	color: var(--gscc-primary-text);
	box-shadow: 0 2px 10px rgba(0, 0, 0, .2);
	cursor: pointer;
	opacity: .85;
	transition: opacity .15s, transform .15s;
}
.gscc-floating:hover { opacity: 1; transform: scale(1.06); }
.gscc-floating--left { left: 16px; }
.gscc-floating--right { right: 16px; }

/* ---------- Plassholder for blokkert innhold ---------- */

.gscc-embed {
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	min-height: 220px;
	padding: 24px;
	background: repeating-linear-gradient(45deg, rgba(127, 127, 127, .08) 0 12px, rgba(127, 127, 127, .14) 12px 24px);
	border-radius: calc(var(--gscc-radius) * .6);
	text-align: center;
	color: inherit;
}
.gscc-embed *, .gscc-embed *::before { box-sizing: border-box; }
.gscc-embed__inner { max-width: 420px; }
.gscc-embed__inner p { margin: 0 0 14px; font-size: 14px; line-height: 1.5; }

/* ---------- Shortcodes ---------- */

.gscc-settings-link {
	padding: 0;
	border: 0;
	background: none;
	color: inherit;
	font: inherit;
	text-decoration: underline;
	cursor: pointer;
}
.gscc-cookie-list table { width: 100%; border-collapse: collapse; margin: 0 0 24px; font-size: .9em; }
.gscc-cookie-list th,
.gscc-cookie-list td { padding: 8px 10px; border-bottom: 1px solid rgba(127, 127, 127, .25); text-align: left; vertical-align: top; }

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

@media (max-width: 640px) {
	.gscc--box-left .gscc-banner,
	.gscc--box-right .gscc-banner,
	.gscc--bar .gscc-banner {
		left: 0;
		right: 0;
		bottom: 0;
		width: 100%;
		border-radius: var(--gscc-radius) var(--gscc-radius) 0 0;
		padding: 20px;
		display: block;
	}
	#gscc-root .gscc-actions { flex-direction: column; }
	#gscc-root .gscc-btn { width: 100%; }
	.gscc--bar .gscc-actions { flex-wrap: wrap; }
	.gscc-modal { padding: 0; align-items: flex-end; }
	.gscc-modal__panel { max-height: 90vh; max-height: 90dvh; border-radius: var(--gscc-radius) var(--gscc-radius) 0 0; }
}

@media (prefers-reduced-motion: reduce) {
	.gscc-banner,
	.gscc-modal__panel { animation: none; }
	.gscc-switch__track,
	.gscc-switch__track::after { transition: none; }
}

@keyframes gscc-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: none; }
}

@media print {
	#gscc-root,
	.gscc-floating { display: none !important; }
}
