/**
 * Cookie banner — MigraSync brand (#9966cc), Albert Sans / Hanken Grotesk, 4px radius,
 * checkboxes aligned with migration wizard / newsletter .msw-choice pattern.
 */
.msw-cc {
	--msw-cc-brand: #9966cc;
	--msw-cc-brand-hover: #8759b8;
	--msw-cc-slate-600: #475569;
	--msw-cc-slate-500: #64748b;
	--msw-cc-slate-200: #e2e8f0;
	--msw-cc-slate-100: #f1f5f9;

	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 99990;
	pointer-events: none;
	font-family: "Hanken Grotesk", system-ui, -apple-system, sans-serif;
}

.msw-cc * {
	box-sizing: border-box;
}

.msw-cc__inner {
	pointer-events: auto;
	margin: 12px;
	max-width: 720px;
	margin-left: auto;
	margin-right: auto;
	background: #ffffff;
	color: #0f172a;
	border-radius: 4px;
	box-shadow: 0 10px 40px rgba(15, 23, 42, 0.12);
	border: 1px solid var(--msw-cc-slate-200);
	padding: 18px 20px 20px;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.msw-cc__top {
	display: flex;
	flex-direction: column;
	align-items: stretch;
	gap: 14px;
	width: 100%;
}

@media (min-width: 640px) {
	.msw-cc__top {
		flex-direction: row;
		align-items: flex-start;
		justify-content: space-between;
		gap: 20px 24px;
	}
}

.msw-cc__text {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.55;
	color: var(--msw-cc-slate-600);
	width: 100%;
	flex: 1 1 auto;
	min-width: 0;
}

@media (min-width: 640px) {
	.msw-cc__text {
		padding-top: 2px;
	}
}

.msw-cc__actions {
	display: flex;
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	flex-shrink: 0;
	width: 100%;
}

@media (min-width: 640px) {
	.msw-cc__actions {
		width: auto;
		max-width: 340px;
	}
}

.msw-cc__btn {
	border: 0;
	border-radius: 4px;
	padding: 10px 16px;
	font-size: 0.875rem;
	font-weight: 600;
	font-family: inherit;
	cursor: pointer;
	transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease, opacity 0.15s ease;
	white-space: nowrap;
	-webkit-tap-highlight-color: transparent;
}

.msw-cc__btn:disabled {
	opacity: 0.55;
	cursor: not-allowed;
}

.msw-cc__btn:focus {
	outline: none;
}

.msw-cc__btn:focus-visible {
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(153, 102, 204, 0.45);
}

.msw-cc__btn--ghost {
	background: transparent;
	color: var(--msw-cc-brand);
	border: 2px solid var(--msw-cc-brand);
}

.msw-cc__btn--ghost:hover:not(:disabled) {
	background: rgba(153, 102, 204, 0.08);
	border-color: var(--msw-cc-brand-hover);
	color: var(--msw-cc-brand-hover);
}

.msw-cc__btn--primary {
	background: var(--msw-cc-brand);
	color: #ffffff;
	border: 2px solid var(--msw-cc-brand);
}

.msw-cc__btn--primary:hover:not(:disabled) {
	background: var(--msw-cc-brand-hover);
	border-color: var(--msw-cc-brand-hover);
}

.msw-cc__panel {
	width: 100%;
	display: flex;
	flex-direction: column;
	gap: 0;
}

.msw-cc__inner.msw-cc--settings-open .msw-cc__panel {
	margin-top: 18px;
	padding-top: 18px;
	border-top: 1px solid var(--msw-cc-slate-200);
}

.msw-cc__row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	padding: 12px 0;
	border-bottom: 1px solid var(--msw-cc-slate-100);
}

.msw-cc__row:last-of-type {
	border-bottom: none;
}

.msw-cc__row-text {
	flex: 1 1 auto;
	min-width: 0;
}

.msw-cc__label {
	display: block;
	font-family: "Albert Sans", system-ui, sans-serif;
	font-weight: 700;
	font-size: 0.8125rem;
	color: #000000;
	line-height: 1.35;
}

.msw-cc__hint {
	display: block;
	font-size: 0.75rem;
	color: var(--msw-cc-slate-500);
	margin-top: 4px;
	line-height: 1.45;
	max-width: 42em;
}

/* Wizard-style checkboxes (no native blue accent) */
.msw-cc__toggle {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 18px;
	height: 18px;
	min-width: 18px;
	flex-shrink: 0;
	margin: 0;
	cursor: pointer;
	border: 2px solid #cbd5e1;
	border-radius: 4px;
	background-color: #ffffff;
	accent-color: transparent;
	color: inherit;
	forced-color-adjust: none;
	color-scheme: only light;
	-webkit-tap-highlight-color: transparent;
	transition: border-color 0.15s ease, background 0.15s ease;
	align-self: center;
	print-color-adjust: exact;
	-webkit-print-color-adjust: exact;
}

.msw-cc__toggle:hover:not(:disabled) {
	border-color: rgba(153, 102, 204, 0.55);
}

.msw-cc__toggle:checked {
	border-color: var(--msw-cc-brand);
	background-color: var(--msw-cc-brand);
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23ffffff' d='M6.37 12.04 2.6 8.27l1.06-1.06 2.6 2.6 6.08-6.08 1.06 1.06-7.14 7.15z'/%3E%3C/svg%3E");
	background-size: 12px 12px;
	background-position: center center;
	background-repeat: no-repeat;
}

.msw-cc__toggle:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.msw-cc__toggle:focus {
	outline: none;
}

.msw-cc__toggle:focus-visible {
	box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px rgba(153, 102, 204, 0.45);
}

.msw-cc__panel-footer {
	display: flex;
	flex-direction: row;
	justify-content: flex-end;
	align-items: center;
	margin-top: 8px;
	padding-top: 4px;
	gap: 10px;
}
