/* PDPA Cookie Consent */
#cookie-consent {
	--cc-red: #d10000;
	--cc-red-dark: #a80000;
	--cc-text: #222;
	--cc-muted: #666;
	--cc-line: #e6e6e6;
	--cc-bg: #fff;
}
#cookie-consent [hidden] { display: none !important; }

.cc-banner {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 10000;
	display: flex;
	gap: 14px;
	width: calc(100% - 40px);
	max-width: 460px;
	padding: 20px;
	background: var(--cc-bg);
	color: var(--cc-text);
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
	opacity: 0;
	transform: translateY(20px);
	transition: opacity .25s ease, transform .25s ease;
}
.cc-banner.cc-show { opacity: 1; transform: none; }
.cc-banner-icon {
	flex: 0 0 44px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: #fff1f1;
	color: var(--cc-red);
	font-size: 22px;
}
.cc-title { font-size: 18px; font-weight: 600; color: var(--cc-text); margin-bottom: 4px; }
.cc-text { font-size: 14px; line-height: 1.6; color: var(--cc-muted); margin: 0 0 14px; }
.cc-text a { color: var(--cc-red); text-decoration: underline; }
.cc-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.cc-btn {
	border: 1px solid transparent;
	border-radius: 999px;
	padding: 9px 18px;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.2;
	white-space: nowrap;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.cc-btn-primary { background: var(--cc-red); color: #fff; }
.cc-btn-primary:hover { background: var(--cc-red-dark); }
.cc-btn-outline { background: #fff; color: var(--cc-text); border-color: #ccc; }
.cc-btn-outline:hover { border-color: var(--cc-text); }
.cc-btn-link { background: none; color: var(--cc-muted); text-decoration: underline; padding-left: 6px; padding-right: 6px; }
.cc-btn-link:hover { color: var(--cc-text); }
.cc-btn:focus-visible, .cc-close:focus-visible, .cc-switch input:focus-visible + .cc-slider {
	outline: 3px solid rgba(209, 0, 0, .35);
	outline-offset: 2px;
}

.cc-modal {
	position: fixed;
	inset: 0;
	z-index: 10001;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba(0, 0, 0, .5);
	opacity: 0;
	transition: opacity .25s ease;
}
.cc-modal.cc-show { opacity: 1; }
.cc-modal-box {
	width: 100%;
	max-width: 560px;
	max-height: calc(100vh - 32px);
	display: flex;
	flex-direction: column;
	background: var(--cc-bg);
	border-radius: 16px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, .3);
	overflow: hidden;
}
.cc-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px;
	border-bottom: 1px solid var(--cc-line);
}
.cc-modal-head .cc-title { margin: 0; }
.cc-close {
	width: 36px;
	height: 36px;
	border: 0;
	border-radius: 50%;
	background: #f2f2f2;
	color: var(--cc-text);
	font-size: 16px;
	cursor: pointer;
}
.cc-close:hover { background: #e4e4e4; }
.cc-modal-body { padding: 18px 20px; overflow-y: auto; }
.cc-modal-foot {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 8px;
	padding: 14px 20px;
	border-top: 1px solid var(--cc-line);
	background: #fafafa;
}

.cc-cat { border: 1px solid var(--cc-line); border-radius: 12px; padding: 14px 16px; margin-bottom: 10px; }
.cc-cat-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: 0; cursor: pointer; }
.cc-cat-title { font-size: 15px; font-weight: 600; color: var(--cc-text); }
.cc-cat-desc { font-size: 13px; line-height: 1.55; color: var(--cc-muted); margin-top: 2px; }
.cc-always { flex: 0 0 auto; font-size: 13px; font-weight: 600; color: #1a8f3c; }

.cc-switch { position: relative; flex: 0 0 46px; width: 46px; height: 26px; }
.cc-switch input { position: absolute; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.cc-slider {
	position: absolute;
	inset: 0;
	border-radius: 999px;
	background: #cfcfcf;
	transition: background .2s;
	pointer-events: none;
}
.cc-slider::before {
	content: "";
	position: absolute;
	top: 3px;
	left: 3px;
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: #fff;
	box-shadow: 0 1px 3px rgba(0, 0, 0, .25);
	transition: transform .2s;
}
.cc-switch input:checked + .cc-slider { background: var(--cc-red); }
.cc-switch input:checked + .cc-slider::before { transform: translateX(20px); }

html.cc-lock, html.cc-lock body { overflow: hidden; }

@media (max-width: 575px) {
	.cc-banner {
		left: 10px;
		bottom: calc(var(--fab-bar-h, 0px) + 10px);
		width: calc(100% - 20px);
		padding: 16px;
	}
	.cc-banner-icon { display: none; }
	.cc-actions .cc-btn-primary, .cc-actions .cc-btn-outline { flex: 1 1 auto; padding-left: 12px; padding-right: 12px; }
	.cc-actions .cc-btn-link { flex: 1 1 100%; }
	.cc-modal { align-items: flex-end; padding: 0; }
	.cc-modal-box { max-height: 90vh; border-radius: 16px 16px 0 0; }
	.cc-modal-foot .cc-btn { flex: 1 1 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.cc-banner, .cc-modal, .cc-slider, .cc-slider::before { transition: none; }
}
