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

.pdpa-hidden { display: none !important; }

/* ---------- แถบด้านล่าง ---------- */
.pdpa-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	background: #202020;
	color: #fff;
	border-top: 4px solid #FFE500;
	box-shadow: 0 -5px 25px rgba(0,0,0,.45);
	padding: 18px 15px;
	font-size: 15px;
	line-height: 1.7;
	transform: translateY(110%);
	transition: transform .35s ease;
}

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

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

.pdpa-bar__text { flex: 1 1 460px; min-width: 260px; }

.pdpa-bar__title {
	display: block;
	color: #FFE500;
	font-size: 18px;
	font-weight: 700;
	margin-bottom: 4px;
}

.pdpa-bar__text p { margin: 0; color: #e6e6e6; }
.pdpa-bar__text a { color: #FFE500; text-decoration: underline; }
.pdpa-bar__text a:hover { color: #fff; }

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

/* ---------- ปุ่ม ---------- */
.pdpa-btn {
	display: inline-block;
	border: 2px solid transparent;
	border-radius: 25px;
	padding: 9px 22px;
	font-size: 15px;
	font-weight: 700;
	line-height: 1.4;
	cursor: pointer;
	text-align: center;
	white-space: nowrap;
	transition: all .2s ease;
}

.pdpa-btn--accept { background: #FFE500; color: #202020; }
.pdpa-btn--accept:hover { background: #fff; color: #000; }

.pdpa-btn--reject { background: transparent; color: #fff; border-color: #8a8a8a; }
.pdpa-btn--reject:hover { border-color: #fff; background: rgba(255,255,255,.08); }

.pdpa-btn--settings { background: transparent; color: #FFE500; border-color: #FFE500; }
.pdpa-btn--settings:hover { background: #FFE500; color: #202020; }

.pdpa-btn--save { background: #0088cc; color: #fff; }
.pdpa-btn--save:hover { background: #0066CF; }

/* ---------- หน้าต่างตั้งค่า ---------- */
.pdpa-modal {
	position: fixed;
	inset: 0;
	z-index: 10010;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	background: rgba(0,0,0,.65);
	opacity: 0;
	visibility: hidden;
	transition: opacity .25s ease, visibility .25s ease;
}

.pdpa-modal.is-open { opacity: 1; visibility: visible; }

.pdpa-modal__box {
	background: #fff;
	color: #333;
	border-radius: 12px;
	width: 100%;
	max-width: 720px;
	max-height: 88vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 60px rgba(0,0,0,.4);
	transform: translateY(20px);
	transition: transform .25s ease;
}

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

.pdpa-modal__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	padding: 18px 22px;
	border-bottom: 1px solid #ececec;
}

.pdpa-modal__head h4 {
	margin: 0;
	font-size: 20px;
	color: #0066CF;
	font-weight: 700;
}

.pdpa-modal__close {
	background: none;
	border: 0;
	font-size: 26px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 0 4px;
}
.pdpa-modal__close:hover { color: #333; }

.pdpa-modal__body {
	padding: 18px 22px;
	overflow-y: auto;
	font-size: 15px;
	line-height: 1.75;
}

.pdpa-modal__intro { color: #555; margin-bottom: 18px; }
.pdpa-modal__intro a { color: #0066CF; text-decoration: underline; }

.pdpa-modal__foot {
	padding: 15px 22px;
	border-top: 1px solid #ececec;
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	justify-content: flex-end;
}

/* ---------- รายการประเภทคุกกี้ ---------- */
.pdpa-item {
	border: 1px solid #e6e6e6;
	border-radius: 10px;
	padding: 14px 16px;
	margin-bottom: 12px;
	background: #fcfcfc;
}

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

.pdpa-item__title {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
	color: #202020;
}

.pdpa-item__desc {
	margin: 8px 0 0;
	color: #666;
	font-size: 14px;
}

.pdpa-item__always {
	font-size: 13px;
	font-weight: 700;
	color: #1a9c4c;
	white-space: nowrap;
}

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

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

.pdpa-switch__slider {
	position: absolute;
	inset: 0;
	background: #c9c9c9;
	border-radius: 28px;
	cursor: pointer;
	transition: background .2s ease;
}

.pdpa-switch__slider:before {
	content: "";
	position: absolute;
	height: 22px;
	width: 22px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform .2s ease;
	box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.pdpa-switch input:checked + .pdpa-switch__slider { background: #0088cc; }
.pdpa-switch input:checked + .pdpa-switch__slider:before { transform: translateX(24px); }
.pdpa-switch input:focus-visible + .pdpa-switch__slider { outline: 2px solid #0066CF; outline-offset: 2px; }

/* ---------- ปุ่มลอย "ตั้งค่าคุกกี้" ---------- */
.pdpa-float {
	position: fixed;
	left: 15px;
	bottom: 15px;
	z-index: 9990;
	width: 44px;
	height: 44px;
	border-radius: 50%;
	border: 0;
	background: #202020;
	color: #FFE500;
	font-size: 18px;
	cursor: pointer;
	box-shadow: 0 3px 12px rgba(0,0,0,.35);
	transition: all .2s ease;
}
.pdpa-float:hover { background: #FFE500; color: #202020; }

/* ---------- ตารางรายการคุกกี้ในหน้านโยบาย ---------- */
.pdpa-table-wrap { overflow-x: auto; }

.pdpa-table {
	width: 100%;
	min-width: 620px;
	border-collapse: collapse;
	font-size: 14.5px;
	margin-bottom: 10px;
}

.pdpa-table th,
.pdpa-table td {
	border: 1px solid #e2e2e2;
	padding: 10px 12px;
	vertical-align: top;
	text-align: left;
}

.pdpa-table th { background: #f2f7fb; color: #0066CF; font-weight: 700; white-space: nowrap; }
.pdpa-table tbody tr:nth-child(even) td { background: #fafafa; }

/* ---------- มือถือ ---------- */
@media (max-width: 767px) {
	.pdpa-bar { padding: 15px 12px; font-size: 14px; }
	.pdpa-bar__inner { gap: 12px; }
	.pdpa-bar__actions { width: 100%; }
	.pdpa-bar__actions .pdpa-btn { flex: 1 1 100%; }
	.pdpa-modal { padding: 10px; }
	.pdpa-modal__foot { justify-content: stretch; }
	.pdpa-modal__foot .pdpa-btn { flex: 1 1 100%; }
	.pdpa-float { width: 40px; height: 40px; font-size: 16px; }
}
