/* ConsentPilot, banner-stil. Variabler settes inline av banner.js fra innstillingene. */

.cp-banner {
	position: fixed;
	z-index: 999999;
	box-sizing: border-box;
	background: #ffffff;
	color: #1a1a1a;
	box-shadow: 0 2px 24px rgba(0, 0, 0, 0.18);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.5;
}

.cp-banner * {
	box-sizing: border-box;
}

/* Layout: box (hjørne) */
.cp-banner--box {
	max-width: 420px;
	border-radius: 12px;
	padding: 20px;
	left: 20px;
}

.cp-banner--box.cp-pos-bottom { bottom: 20px; }
.cp-banner--box.cp-pos-top { top: 20px; }

/* Layout: bar (full bredde) */
.cp-banner--bar {
	left: 0;
	right: 0;
	padding: 18px 24px;
	display: flex;
	align-items: center;
	gap: 20px;
	flex-wrap: wrap;
}

.cp-banner--bar.cp-pos-bottom { bottom: 0; }
.cp-banner--bar.cp-pos-top { top: 0; }

/* Layout: popup (modal i midten) */
.cp-banner--popup {
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	max-width: 480px;
	border-radius: 14px;
	padding: 24px;
}

.cp-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.45);
	z-index: 999998;
}

.cp-banner__logo {
	text-align: center;
	margin: 0 0 12px;
}

.cp-banner__logo img {
	max-height: 40px;
	max-width: 200px;
	width: auto;
	height: auto;
	display: inline-block;
}

.cp-banner__text {
	margin: 0 0 14px;
}

.cp-powered-by {
	display: block;
	text-align: center;
	margin-top: 14px;
	font-size: 11px;
	color: #999;
	text-decoration: none;
	letter-spacing: 0.2px;
}

.cp-powered-by:hover,
.cp-powered-by:focus {
	color: #666;
	text-decoration: underline;
}

@media (prefers-color-scheme: dark) {
	.cp-powered-by { color: #777; }
	.cp-powered-by:hover, .cp-powered-by:focus { color: #aaa; }
}

.cp-banner__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.cp-btn {
	cursor: pointer;
	border: 1px solid transparent;
	border-radius: 8px;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	font-family: inherit;
}

.cp-btn--accept {
	background: var(--cp-primary, #1f6feb);
	color: #ffffff;
}

.cp-btn--decline,
.cp-btn--settings {
	background: transparent;
	border-color: #d0d0d0;
	color: #1a1a1a;
}

.cp-btn:focus-visible {
	outline: 3px solid var(--cp-primary, #1f6feb);
	outline-offset: 2px;
}

/* Kategori-velger */
.cp-categories {
	margin: 14px 0;
	display: grid;
	gap: 10px;
}

.cp-category {
	display: flex;
	gap: 10px;
	align-items: flex-start;
	padding: 10px;
	border: 1px solid #e5e5e5;
	border-radius: 8px;
}

.cp-category__label {
	display: block;
	font-weight: 600;
	margin-bottom: 3px;
}

.cp-category__desc {
	display: block;
	font-size: 13px;
	line-height: 1.4;
	color: #555;
}

.cp-category input[disabled] {
	cursor: not-allowed;
}

/* Liten flytende knapp for å gjenåpne innstillinger */
.cp-reopen {
	position: fixed;
	bottom: 16px;
	left: 16px;
	z-index: 999997;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	height: 44px;
	padding: 0 16px 0 12px;
	border-radius: 22px;
	border: none;
	background: var(--cp-primary, #1f6feb);
	color: #fff;
	cursor: pointer;
	font: 500 13px/1 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
	transition: transform .15s ease, box-shadow .15s ease;
}
.cp-reopen:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(0, 0, 0, .2);
}
.cp-reopen:focus-visible {
	outline: 2px solid #fff;
	outline-offset: 2px;
}
.cp-reopen__icon {
	width: 22px;
	height: 22px;
	flex: 0 0 auto;
}
.cp-reopen__label {
	white-space: nowrap;
}
/* Kompakt-modus: kun ikonet på smale skjermer */
@media (max-width: 480px) {
	.cp-reopen {
		padding: 0;
		width: 44px;
		justify-content: center;
	}
	.cp-reopen__label {
		display: none;
	}
}

@media (prefers-color-scheme: dark) {
	.cp-banner {
		background: #1c1c1e;
		color: #f2f2f2;
	}
	.cp-category { border-color: #3a3a3c; }
	.cp-category__desc { color: #aaa; }
	.cp-btn--decline,
	.cp-btn--settings { color: #f2f2f2; border-color: #48484a; }
}
