/**
 * Cookie 同意通知 — 顧問事務所專業風格
 *
 * 設計原則：
 *   - 主色 #0b2f53（深藍）+ 金色 accent #e2ae3b 對齊網站品牌
 *   - 不浮誇、不擋畫面，採半透明深色底 + 細邊框
 *   - 桌面右下角 card 形式；手機底部 sticky
 */

.cookie-consent {
	position: fixed;
	bottom: 24px;
	left: 24px;
	right: auto;
	width: 100%;
	max-width: 440px;
	z-index: 10000;
	background: #fff;
	color: #0b2f53;
	border: 1px solid rgba(11, 47, 83, 0.12);
	border-top: 3px solid #e2ae3b;
	border-radius: 8px;
	box-shadow: 0 12px 32px rgba(11, 47, 83, 0.18);
	padding: 22px 24px 20px;
	transform: translateY(calc(100% + 32px));
	opacity: 0;
	transition: transform 0.45s cubic-bezier(0.22, 0.61, 0.36, 1), opacity 0.35s ease;
	box-sizing: border-box;
}

.cookie-consent.show {
	transform: translateY(0);
	opacity: 1;
}

.cookie-consent__inner {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.cookie-consent__title {
	font-size: 16px;
	font-weight: 600;
	color: #0b2f53;
	margin: 0;
	letter-spacing: 0.01em;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cookie-consent__title::before {
	content: '';
	display: inline-block;
	width: 4px;
	height: 16px;
	background: #e2ae3b;
	border-radius: 1px;
}

.cookie-consent__text {
	font-size: 14px;
	line-height: 1.7;
	color: #374151;
	margin: 0;
}

.cookie-consent__text a {
	color: #0b2f53;
	font-weight: 500;
	text-decoration: none;
	text-underline-offset: 2px;
	transition: text-decoration-color 0.2s ease;
}

.cookie-consent__text a:hover {
	text-decoration: underline;
	text-decoration-color: #e2ae3b;
}

.cookie-consent__actions {
	display: flex;
	gap: 10px;
	flex-shrink: 0;
	justify-content: flex-end;
	margin-top: 4px;
}

.cookie-consent__btn {
	padding: 11px 22px;
	border-radius: 4px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	border: 1px solid transparent;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	white-space: nowrap;
	font-family: inherit;
	letter-spacing: 0.02em;
}

.cookie-consent__btn--accept {
	background: #0b2f53;
	color: #fff;
	border-color: #0b2f53;
}

.cookie-consent__btn--accept:hover {
	background: #071e36;
	border-color: #071e36;
}

.cookie-consent__btn--accept:focus-visible {
	outline: 2px solid #e2ae3b;
	outline-offset: 2px;
}

.cookie-consent__btn--settings {
	background: transparent;
	color: #0b2f53;
	border-color: rgba(11, 47, 83, 0.3);
}

.cookie-consent__btn--settings:hover {
	background: #f5f7fa;
	border-color: #0b2f53;
}

/* ====================================================
 * Cookie 設定面板（保留樣式以利未來擴充）
 * ==================================================== */
.cookie-settings {
	display: none;
	margin-top: 16px;
	border-top: 1px solid rgba(11, 47, 83, 0.1);
	padding-top: 16px;
}

.cookie-settings.open {
	display: block;
}

.cookie-settings__list {
	display: flex;
	flex-direction: column;
	gap: 14px;
	margin-bottom: 16px;
}

.cookie-settings__item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.cookie-settings__toggle {
	position: relative;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
	margin-top: 2px;
}

.cookie-settings__toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.cookie-settings__slider {
	position: absolute;
	inset: 0;
	background: #cbd5e1;
	border-radius: 22px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.cookie-settings__slider::before {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
}

.cookie-settings__toggle input:checked + .cookie-settings__slider {
	background: #0b2f53;
}

.cookie-settings__toggle input:checked + .cookie-settings__slider::before {
	transform: translateX(18px);
}

.cookie-settings__toggle input:disabled + .cookie-settings__slider {
	background: #0b2f53;
	opacity: 0.5;
	cursor: not-allowed;
}

.cookie-settings__info {
	flex: 1;
}

.cookie-settings__label {
	font-size: 14px;
	font-weight: 600;
	color: #0b2f53;
	display: flex;
	align-items: center;
	gap: 8px;
}

.cookie-settings__required {
	font-size: 11px;
	font-weight: 500;
	color: #6b7280;
	background: #f1f5f9;
	padding: 2px 8px;
	border-radius: 3px;
	letter-spacing: 0.04em;
}

.cookie-settings__desc {
	font-size: 13px;
	color: #6b7280;
	line-height: 1.6;
	margin-top: 4px;
}

/* ====================================================
 * RWD
 * ==================================================== */
@media (max-width: 768px) {
	.cookie-consent {
		bottom: 0;
		right: 0;
		left: 0;
		max-width: 100%;
		border-radius: 0;
		border-left: 0;
		border-right: 0;
		border-bottom: 0;
		border-top: 3px solid #e2ae3b;
		padding: 18px 20px 16px;
		transform: translateY(100%);
	}

	.cookie-consent__inner {
		gap: 12px;
	}

	.cookie-consent__title {
		font-size: 15px;
	}

	.cookie-consent__text {
		font-size: 13px;
	}

	.cookie-consent__actions {
		justify-content: stretch;
	}

	.cookie-consent__btn {
		flex: 1;
		padding: 11px 16px;
		font-size: 13px;
	}
}
