/**
 * Cookie Consent Banner & Preferences Modal
 * Centre HOUNGNIBO — Luxury Dahomey Aesthetic
 */

.hgb-cookie-banner {
	position: fixed;
	bottom: 2rem;
	left: 2rem;
	max-width: 490px;
	width: calc(100% - 4rem);
	background: linear-gradient(145deg, #2e1a0b 0%, #1c0e04 100%);
	border: 1px solid rgba(197, 138, 42, 0.45);
	border-radius: 1rem;
	box-shadow: 0 20px 45px -10px rgba(0, 0, 0, 0.6), 0 0 30px rgba(130, 85, 0, 0.2), inset 0 1px 0 rgba(255, 221, 178, 0.15);
	color: #fdf9f0;
	z-index: 99999;
	padding: 1.75rem;
	box-sizing: border-box;
	font-family: 'Montserrat', sans-serif;
	opacity: 0;
	visibility: hidden;
	transform: translateY(30px) scale(0.97);
	transition: opacity 0.4s cubic-bezier(0.16, 1, 0.3, 1),
	            transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
	            visibility 0.4s cubic-bezier(0.16, 1, 0.3, 1);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
}

.hgb-cookie-banner.is-active {
	opacity: 1;
	visibility: visible;
	transform: translateY(0) scale(1);
}

/* Header */
.hgb-cookie-banner__header {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1rem;
}

.hgb-cookie-banner__icon-wrap {
	width: 40px;
	height: 40px;
	border-radius: 0.5rem;
	background: rgba(130, 85, 0, 0.25);
	border: 1px solid rgba(197, 138, 42, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffddb2;
	flex-shrink: 0;
}

.hgb-cookie-banner__icon-wrap svg {
	width: 22px !important;
	height: 22px !important;
	stroke: currentColor !important;
	fill: none;
}

.hgb-cookie-banner__title-wrap {
	flex: 1;
}

.hgb-cookie-banner__tagline {
	display: block;
	font-size: 0.6875rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.12em;
	color: #c58a2a;
	margin-bottom: 0.25rem;
}

.hgb-cookie-banner__title {
	font-family: 'Montserrat Alternates', 'Montserrat', sans-serif;
	font-size: 1.125rem;
	line-height: 1.35;
	font-weight: 700;
	color: #ffffff;
	margin: 0;
}

/* Body description */
.hgb-cookie-banner__text {
	font-size: 0.8125rem;
	line-height: 1.6;
	color: #e6e2d9;
	margin: 0 0 1.25rem 0;
}

.hgb-cookie-banner__text a {
	color: #ffddb2;
	text-decoration: underline;
	text-underline-offset: 3px;
	transition: color 0.2s ease;
}

.hgb-cookie-banner__text a:hover {
	color: #ffffff;
}

/* Preferences Accordion / Panel */
.hgb-cookie-prefs {
	display: none;
	flex-direction: column;
	gap: 0.75rem;
	background: rgba(20, 10, 4, 0.6);
	border: 1px solid rgba(197, 138, 42, 0.25);
	border-radius: 0.625rem;
	padding: 1rem;
	margin-bottom: 1.25rem;
}

.hgb-cookie-prefs.is-open {
	display: flex;
}

.hgb-cookie-pref-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 0.75rem;
	padding-bottom: 0.75rem;
	border-bottom: 1px solid rgba(211, 196, 185, 0.15);
}

.hgb-cookie-pref-item:last-child {
	padding-bottom: 0;
	border-bottom: none;
}

.hgb-cookie-pref-info {
	flex: 1;
}

.hgb-cookie-pref-name {
	font-size: 0.8125rem;
	font-weight: 600;
	color: #ffffff;
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.2rem;
}

.hgb-cookie-pref-badge {
	font-size: 0.625rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.15rem 0.4rem;
	border-radius: 0.25rem;
	background: rgba(130, 85, 0, 0.4);
	color: #ffddb2;
}

.hgb-cookie-pref-desc {
	font-size: 0.75rem;
	line-height: 1.4;
	color: #cbc5c0;
	margin: 0;
}

/* Custom switch */
.hgb-switch {
	position: relative;
	display: inline-block;
	width: 36px;
	height: 20px;
	flex-shrink: 0;
}

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

.hgb-switch__slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(255, 255, 255, 0.2);
	border-radius: 20px;
	transition: background-color 0.25s ease;
}

.hgb-switch__slider:before {
	position: absolute;
	content: "";
	height: 14px;
	width: 14px;
	left: 3px;
	bottom: 3px;
	background-color: #ffffff;
	border-radius: 50%;
	transition: transform 0.25s ease;
}

.hgb-switch input:checked + .hgb-switch__slider {
	background-color: #825500;
}

.hgb-switch input:checked + .hgb-switch__slider:before {
	transform: translateX(16px);
	background-color: #ffddb2;
}

.hgb-switch input:disabled + .hgb-switch__slider {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Actions Buttons */
.hgb-cookie-banner__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.625rem;
}

.hgb-cookie-btn {
	font-family: 'Montserrat', sans-serif;
	font-size: 0.75rem;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.08em;
	padding: 0.625rem 1.125rem;
	border-radius: 0.375rem;
	cursor: pointer;
	transition: all 0.2s ease;
	outline: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	text-decoration: none;
	border: 1px solid transparent;
}

.hgb-cookie-btn--primary {
	background-color: #825500;
	color: #ffffff;
	border-color: #c58a2a;
	box-shadow: 0 4px 12px rgba(130, 85, 0, 0.3);
	flex: 1 1 auto;
}

.hgb-cookie-btn--primary:hover {
	background-color: #9e6b00;
	color: #ffffff;
	transform: translateY(-1px);
	box-shadow: 0 6px 16px rgba(130, 85, 0, 0.45);
}

.hgb-cookie-btn--outline {
	background-color: transparent;
	color: #ffddb2;
	border-color: rgba(197, 138, 42, 0.4);
	flex: 1 1 auto;
}

.hgb-cookie-btn--outline:hover {
	background-color: rgba(130, 85, 0, 0.2);
	border-color: #ffddb2;
	color: #ffffff;
}

.hgb-cookie-btn--ghost {
	background-color: transparent;
	color: #cbc5c0;
	border-color: transparent;
	padding: 0.5rem 0.75rem;
	font-size: 0.6875rem;
	width: 100%;
}

.hgb-cookie-btn--ghost:hover {
	color: #ffddb2;
	text-decoration: underline;
}

/* Mobile adjustments */
@media (max-width: 640px) {
	.hgb-cookie-banner {
		bottom: 1rem;
		left: 1rem;
		right: 1rem;
		width: calc(100% - 2rem);
		padding: 1.25rem;
		border-radius: 0.875rem;
	}

	.hgb-cookie-banner__actions {
		flex-direction: column;
	}

	.hgb-cookie-btn {
		width: 100%;
	}
}
