/* 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__text {
	margin: 0 0 14px;
}

.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 {
	font-weight: 600;
}

.cp-category__desc {
	font-size: 13px;
	color: #555;
	margin-top: 2px;
}

.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;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: none;
	background: var(--cp-primary, #1f6feb);
	color: #fff;
	cursor: pointer;
	font-size: 20px;
}

@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; }
}
