/* ==============================================
   Cookie Consent Banner & Settings Modal
   ============================================== */

/* === Banner === */
.pmn-cc-banner {
	position: fixed;
	left: 50%;
	bottom: 16px;
	transform: translateX(-50%) translateY(120%);
	width: calc(100% - 32px);
	max-width: 800px;
	background: #fff;
	border: 1px solid var(--pm-border);
	border-radius: 16px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
	padding: 20px 24px;
	z-index: 9998;
	font-family: var(--pm-font-body);
	color: var(--pm-text);
	transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	box-sizing: border-box;
}

.pmn-cc-banner.is-visible {
	transform: translateX(-50%) translateY(0);
}

.pmn-cc-banner__title {
	font-family: var(--pm-font-heading);
	font-weight: 700;
	font-size: 1rem;
	margin: 0 0 6px;
	color: var(--pm-text);
}

.pmn-cc-banner__msg {
	font-size: 0.85rem;
	color: var(--pm-text-sub);
	line-height: 1.7;
	margin: 0 0 16px;
}

.pmn-cc-banner__msg a {
	color: var(--pm-primary);
}

.pmn-cc-banner__btns {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

/* === Buttons === */
.pmn-cc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 18px;
	border-radius: var(--pm-radius-btn, 12px);
	font-family: var(--pm-font-heading);
	font-weight: 700;
	font-size: 0.85rem;
	cursor: pointer;
	border: 1px solid transparent;
	background: transparent;
	color: var(--pm-text);
	transition: background 0.15s, border-color 0.15s, color 0.15s;
	min-height: 36px;
	white-space: nowrap;
}

.pmn-cc-btn--primary {
	background: var(--pm-primary);
	color: #fff;
}
.pmn-cc-btn--primary:hover {
	background: var(--pm-primary-hover, #5BA0C2);
	color: #fff;
}

.pmn-cc-btn--secondary {
	background: #fff;
	color: var(--pm-primary);
	border-color: var(--pm-primary);
}
.pmn-cc-btn--secondary:hover {
	background: var(--pm-primary-soft, #E3F0F7);
}

.pmn-cc-btn--ghost {
	color: var(--pm-text-sub);
	text-decoration: underline;
	padding-left: 6px;
	padding-right: 6px;
}
.pmn-cc-btn--ghost:hover {
	color: var(--pm-primary);
}

@media (max-width: 600px) {
	.pmn-cc-banner {
		left: 0;
		right: 0;
		bottom: 0;
		transform: translateY(100%);
		width: 100%;
		max-width: none;
		border-radius: 16px 16px 0 0;
		padding: 16px 18px 18px;
		border-bottom: none;
	}
	.pmn-cc-banner.is-visible {
		transform: translateY(0);
	}
	.pmn-cc-banner__btns {
		flex-direction: column;
		align-items: stretch;
	}
	.pmn-cc-btn {
		width: 100%;
	}
}

/* === Settings Modal === */
.pmn-cc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 9999;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 16px;
	opacity: 0;
	transition: opacity 0.2s;
}

.pmn-cc-overlay.is-visible {
	display: flex;
	opacity: 1;
}

.pmn-cc-modal {
	background: #fff;
	border-radius: var(--pm-radius-card, 16px);
	max-width: 480px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	font-family: var(--pm-font-body);
	color: var(--pm-text);
	box-shadow: 0 12px 32px rgba(0, 0, 0, 0.18);
}

.pmn-cc-modal__header {
	padding: 20px 24px 16px;
	border-bottom: 1px solid var(--pm-border);
}

.pmn-cc-modal__title {
	font-family: var(--pm-font-heading);
	font-weight: 700;
	font-size: 1.1rem;
	margin: 0 0 6px;
	color: var(--pm-text);
}

.pmn-cc-modal__lead {
	font-size: 0.82rem;
	color: var(--pm-text-sub);
	margin: 0;
	line-height: 1.6;
}

.pmn-cc-modal__body {
	padding: 4px 24px;
}

.pmn-cc-cat {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 16px;
	align-items: start;
	padding: 16px 0;
	border-bottom: 1px solid var(--pm-border);
}

.pmn-cc-cat:last-child {
	border-bottom: none;
}

.pmn-cc-cat__title {
	font-family: var(--pm-font-heading);
	font-weight: 700;
	font-size: 0.92rem;
	color: var(--pm-text);
	margin: 0 0 4px;
}

.pmn-cc-cat__desc {
	font-size: 0.78rem;
	color: var(--pm-text-sub);
	line-height: 1.6;
	margin: 0;
}

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

.pmn-cc-switch input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.pmn-cc-switch__slider {
	position: absolute;
	inset: 0;
	background: #d8d0c8;
	border-radius: 9999px;
	cursor: pointer;
	transition: background 0.2s;
}

.pmn-cc-switch__slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.pmn-cc-switch input:checked + .pmn-cc-switch__slider {
	background: var(--pm-primary);
}

.pmn-cc-switch input:checked + .pmn-cc-switch__slider::before {
	transform: translateX(20px);
}

.pmn-cc-switch input:disabled + .pmn-cc-switch__slider {
	background: var(--pm-primary);
	opacity: 0.55;
	cursor: not-allowed;
}

.pmn-cc-modal__footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 16px 24px 20px;
	border-top: 1px solid var(--pm-border);
}

@media (max-width: 480px) {
	.pmn-cc-modal__footer {
		flex-direction: column-reverse;
	}
	.pmn-cc-modal__footer .pmn-cc-btn {
		width: 100%;
	}
}
