/* ==========================================================
   PDPA : แถบขอความยินยอมคุกกี้ + หน้าต่างตั้งค่าคุกกี้
   ========================================================== */

.pdpa-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10050;
	background: #FFF;
	box-shadow: 0 -6px 30px rgba(0, 0, 0, .18);
	border-top: 4px solid #163E93;
	padding: 18px 20px;
	transform: translateY(120%);
	transition: transform .45s cubic-bezier(.22, 1, .36, 1);
	font-family: 'Kanit', sans-serif;
}

.pdpa-bar.is-open {
	transform: translateY(0);
}

.pdpa-bar__inner {
	max-width: 1180px;
	margin: 0 auto;
	display: flex;
	align-items: center;
	gap: 24px;
	flex-wrap: wrap;
}

.pdpa-bar__text {
	flex: 1 1 420px;
	font-size: 15px;
	line-height: 26px;
	color: #444;
}

.pdpa-bar__text strong {
	display: block;
	font-size: 18px;
	color: #163E93;
	margin-bottom: 4px;
}

.pdpa-bar__text a {
	color: #163E93;
	text-decoration: underline;
}

.pdpa-bar__actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	align-items: center;
}

.pdpa-btn {
	font-family: 'Kanit', sans-serif;
	font-size: 15px;
	line-height: 1;
	padding: 12px 22px;
	border-radius: 30px;
	border: 2px solid transparent;
	cursor: pointer;
	transition: .2s;
	white-space: nowrap;
}

.pdpa-btn--primary {
	background: #163E93;
	color: #FFF;
}

.pdpa-btn--primary:hover {
	background: #102c6b;
	color: #FFF;
}

.pdpa-btn--ghost {
	background: #FFF;
	color: #163E93;
	border-color: #c9d4ea;
}

.pdpa-btn--ghost:hover {
	border-color: #163E93;
	background: #f2f6ff;
}

.pdpa-btn--link {
	background: none;
	color: #666;
	text-decoration: underline;
	padding: 12px 6px;
}

.pdpa-btn--link:hover {
	color: #163E93;
}

/* ---------- หน้าต่างตั้งค่า ---------- */

.pdpa-modal {
	position: fixed;
	inset: 0;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10060;
	display: none;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(14, 22, 40, .6);
	font-family: 'Kanit', sans-serif;
}

.pdpa-modal.is-open {
	display: flex;
}

.pdpa-modal__box {
	background: #FFF;
	width: 100%;
	max-width: 680px;
	max-height: 88vh;
	border-radius: 16px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
	animation: pdpaIn .3s ease;
}

@keyframes pdpaIn {
	from { transform: translateY(24px); opacity: 0; }
	to   { transform: translateY(0); opacity: 1; }
}

.pdpa-modal__head {
	padding: 20px 24px;
	background: #163E93;
	color: #FFF;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.pdpa-modal__head h3 {
	margin: 0;
	font-size: 20px;
	color: #FFF;
	font-family: 'Kanit', sans-serif;
}

.pdpa-modal__close {
	background: none;
	border: none;
	color: #FFF;
	font-size: 26px;
	line-height: 1;
	cursor: pointer;
	opacity: .85;
}

.pdpa-modal__close:hover { opacity: 1; }

.pdpa-modal__body {
	padding: 22px 24px;
	overflow-y: auto;
	font-size: 15px;
	line-height: 26px;
	color: #555;
}

.pdpa-modal__body > p {
	margin-bottom: 16px !important;
}

.pdpa-cat {
	border: 1px solid #e6e9f0;
	border-radius: 12px;
	padding: 16px 18px;
	margin-bottom: 12px;
	background: #fbfcfe;
}

.pdpa-cat__top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 14px;
}

.pdpa-cat__name {
	font-size: 16px;
	color: #163E93;
}

.pdpa-cat__desc {
	font-size: 14px;
	line-height: 23px;
	color: #6b7280;
	margin-top: 6px;
}

.pdpa-cat__always {
	font-size: 13px;
	color: #16a34a;
	white-space: nowrap;
}

/* สวิตช์เปิด/ปิด */
.pdpa-switch {
	position: relative;
	display: inline-block;
	width: 52px;
	height: 28px;
	flex: 0 0 52px;
}

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

.pdpa-switch span {
	position: absolute;
	cursor: pointer;
	inset: 0;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #cbd5e1;
	border-radius: 30px;
	transition: .25s;
}

.pdpa-switch span:before {
	content: "";
	position: absolute;
	height: 22px;
	width: 22px;
	left: 3px;
	bottom: 3px;
	background: #FFF;
	border-radius: 50%;
	transition: .25s;
}

.pdpa-switch input:checked + span {
	background: #163E93;
}

.pdpa-switch input:checked + span:before {
	transform: translateX(24px);
}

.pdpa-modal__foot {
	padding: 16px 24px;
	border-top: 1px solid #eef1f6;
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
	background: #fafbfd;
}

@media (max-width: 767px) {
	.pdpa-bar { padding: 16px 14px; }
	.pdpa-bar__inner { gap: 14px; }
	.pdpa-bar__text { font-size: 14px; line-height: 24px; }
	.pdpa-bar__actions { width: 100%; }
	.pdpa-bar__actions .pdpa-btn { flex: 1 1 100%; text-align: center; }
	.pdpa-modal__foot .pdpa-btn { flex: 1 1 100%; }
}
