/* ============================================================
   SE PDPA — Consent UI
   Neutral by default (slate palette) — safe to reuse across
   multiple companies without re-theming. Override via
   --se-pdpa-bg / --se-pdpa-text / --se-pdpa-primary per site
   (set automatically from Settings > colors if provided).
   ============================================================ */

:root {
	--se-pdpa-bg: #ffffff;
	--se-pdpa-text: #1f2937;
	--se-pdpa-primary: #334155;
	--se-pdpa-primary-hover: #1e293b;
	--se-pdpa-border: #e2e8f0;
	--se-pdpa-muted: #64748b;
}

.se-pdpa-banner,
.se-pdpa-modal-overlay,
.se-pdpa-float-settings {
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Sarabun', Roboto, sans-serif;
	box-sizing: border-box;
}

.se-pdpa-banner *,
.se-pdpa-modal-overlay *,
.se-pdpa-float-settings * {
	box-sizing: border-box;
}

/* ---------- Banner ---------- */
.se-pdpa-banner {
	position: fixed;
	z-index: 999999;
	inset: 0;
	display: flex;
	align-items: flex-end;
	padding: 24px;
	pointer-events: none;
}

.se-pdpa-banner.se-pdpa-pos-center {
	align-items: center;
	justify-content: center;
}

.se-pdpa-banner.se-pdpa-pos-left {
	align-items: flex-end;
	justify-content: flex-start;
}

.se-pdpa-banner.se-pdpa-pos-right {
	align-items: flex-end;
	justify-content: flex-end;
}

.se-pdpa-banner-card {
	pointer-events: auto;
	background: var(--se-pdpa-bg);
	color: var(--se-pdpa-text);
	max-width: 560px;
	width: 100%;
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(15, 23, 42, 0.25);
	padding: 36px 40px;
	animation: se-pdpa-rise 0.35s ease-out;
}

@keyframes se-pdpa-rise {
	from {
		opacity: 0;
		transform: translateY(24px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.se-pdpa-banner-icon {
	font-size: 32px;
	margin-bottom: 12px;
}

.se-pdpa-banner-title {
	font-size: 22px;
	font-weight: 700;
	margin: 0 0 14px 0;
	line-height: 1.4;
}

.se-pdpa-banner-desc {
	font-size: 15.5px;
	line-height: 1.75;
	margin: 0 0 28px 0;
	color: var(--se-pdpa-text);
	opacity: 0.88;
}

.se-pdpa-banner-desc a {
	color: var(--se-pdpa-primary);
	text-decoration: underline;
	font-weight: 600;
}

.se-pdpa-banner-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.se-pdpa-banner-actions-row {
	display: flex;
	gap: 12px;
}

.se-pdpa-banner-actions-row .se-pdpa-btn {
	flex: 1;
}

/* ---------- Buttons ---------- */
.se-pdpa-btn {
	appearance: none;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	padding: 13px 20px;
	cursor: pointer;
	transition: all 0.15s ease;
	line-height: 1.4;
}

.se-pdpa-btn-full {
	width: 100%;
}

.se-pdpa-btn-primary {
	background: var(--se-pdpa-primary);
	color: #fff;
}

.se-pdpa-btn-primary:hover {
	background: var(--se-pdpa-primary-hover);
}

.se-pdpa-btn-outline {
	background: transparent;
	color: var(--se-pdpa-text);
	border: 1.5px solid var(--se-pdpa-border);
}

.se-pdpa-btn-outline:hover {
	background: rgba(0, 0, 0, 0.04);
	border-color: var(--se-pdpa-muted);
}

.se-pdpa-btn-ghost {
	background: transparent;
	color: var(--se-pdpa-muted);
}

.se-pdpa-btn-ghost:hover {
	color: var(--se-pdpa-text);
}

/* ---------- Floating settings re-open button ---------- */
.se-pdpa-float-settings {
	position: fixed;
	bottom: 20px;
	left: 20px;
	width: 55px;
	height: 55px;
	border-radius: 50%;
	/* background: var(--se-pdpa-primary); */
	border: none;
	font-size: 2.0em;
	cursor: pointer;
	z-index: 999998;
	box-shadow: 0 4px 16px rgba(15, 23, 42, 0.3);
}

/* ---------- Category modal ---------- */
.se-pdpa-modal-overlay {
	display: none;
	position: fixed;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	z-index: 9999999;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.se-pdpa-modal {
	background: var(--se-pdpa-bg);
	color: var(--se-pdpa-text);
	border-radius: 16px;
	max-width: 540px;
	width: 100%;
	max-height: 85vh;
	overflow-y: auto;
	padding: 32px;
	box-shadow: 0 20px 60px rgba(15, 23, 42, 0.3);
}

.se-pdpa-modal h3 {
	margin: 0 0 8px 0;
	font-size: 20px;
	font-weight: 700;
}

.se-pdpa-modal-intro {
	font-size: 14px;
	color: var(--se-pdpa-muted);
	margin: 0 0 22px 0;
	line-height: 1.6;
}

.se-pdpa-modal-group {
	padding: 16px 0;
	border-bottom: 1px solid var(--se-pdpa-border);
}

.se-pdpa-modal-group:last-child {
	border-bottom: none;
}

.se-pdpa-modal-group-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.se-pdpa-modal-group strong {
	font-size: 15px;
}

.se-pdpa-modal-group p {
	margin: 8px 0 0 0;
	font-size: 13.5px;
	line-height: 1.6;
	color: var(--se-pdpa-muted);
}

.se-pdpa-tag-required {
	display: inline-block;
	margin-top: 8px;
	font-size: 11px;
	font-weight: 600;
	color: var(--se-pdpa-muted);
	background: rgba(100, 116, 139, 0.12);
	padding: 2px 8px;
	border-radius: 20px;
}

.se-pdpa-modal-actions {
	display: flex;
	gap: 10px;
	margin-top: 24px;
}

.se-pdpa-modal-actions .se-pdpa-btn-primary {
	flex: 1;
}

/* ---------- Toggle switch ---------- */
.se-pdpa-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

.se-pdpa-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}

.se-pdpa-switch-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #cbd5e1;
	border-radius: 24px;
	transition: 0.2s;
}

.se-pdpa-switch-slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: 0.2s;
}

.se-pdpa-switch input:checked+.se-pdpa-switch-slider {
	background: var(--se-pdpa-primary);
}

.se-pdpa-switch input:checked+.se-pdpa-switch-slider::before {
	transform: translateX(20px);
}

.se-pdpa-switch input:disabled+.se-pdpa-switch-slider {
	opacity: 0.5;
	cursor: not-allowed;
}

/* ---------- Responsive ---------- */
@media (max-width: 640px) {
	.se-pdpa-banner {
		padding: 12px;
	}

	.se-pdpa-banner-card {
		padding: 26px 22px;
		border-radius: 14px;
	}

	.se-pdpa-banner-title {
		font-size: 19px;
	}

	.se-pdpa-banner-desc {
		font-size: 14.5px;
	}

	.se-pdpa-banner-actions-row {
		flex-direction: column;
	}

	.se-pdpa-modal {
		padding: 22px;
	}
}