/* Consent Gate v1.1.1 – Compact bottom-right style (forced) */

.consent-gate-banner,
.consent-gate-modal {
	--cg-primary: #111111;
	--cg-text: #333333;
	--cg-bg: #ffffff;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	box-sizing: border-box;
}

.consent-gate-banner *,
.consent-gate-modal * {
	box-sizing: border-box;
}

.consent-gate-banner[hidden],
.consent-gate-modal[hidden] {
	display: none !important;
}

/* ========== BANNER – always compact card ========== */
.consent-gate-banner {
	position: fixed !important;
	z-index: 999999;
	background: var(--cg-bg);
	color: var(--cg-text);
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0,0,0,0.12), 0 2px 8px rgba(0,0,0,0.06);
	padding: 18px 20px 16px;
	width: 100%;
	max-width: 380px !important;
	font-size: 13.5px;
	line-height: 1.55;
	left: auto;
	right: 20px;
	bottom: 20px;
	top: auto;
}

/* Explicit positions (still respect max-width) */
.cg-pos-bottom-right {
	right: 20px !important;
	left: auto !important;
	bottom: 20px !important;
	top: auto !important;
}
.cg-pos-bottom-left {
	left: 20px !important;
	right: auto !important;
	bottom: 20px !important;
	top: auto !important;
}
.cg-pos-bottom {
	left: 20px !important;
	right: 20px !important;
	bottom: 20px !important;
	top: auto !important;
	max-width: 480px !important;
	margin: 0 auto;
	width: auto;
}
.cg-pos-top {
	left: 20px !important;
	right: 20px !important;
	top: 20px !important;
	bottom: auto !important;
	max-width: 480px !important;
	margin: 0 auto;
	width: auto;
}

.cg-banner-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: none;
	border: none;
	font-size: 20px;
	line-height: 1;
	color: #999;
	cursor: pointer;
	padding: 2px 6px;
}
.cg-banner-close:hover {
	color: #333;
}

.cg-banner-text {
	margin: 0 24px 14px 0;
	color: var(--cg-text);
}
.cg-banner-text a {
	color: var(--cg-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cg-banner-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
	flex-wrap: wrap;
}

/* ========== BUTTONS ========== */
.cg-btn {
	appearance: none;
	border-radius: 999px;
	padding: 8px 16px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: background 0.15s, color 0.15s, border-color 0.15s, opacity 0.15s;
	line-height: 1.3;
	border: 1px solid transparent;
	white-space: nowrap;
}

.cg-btn-primary {
	background: var(--cg-primary);
	color: #fff !important;
	border-color: var(--cg-primary);
}
.cg-btn-primary:hover {
	opacity: 0.88;
}

.cg-btn-outline {
	background: #fff;
	color: var(--cg-text);
	border-color: #d0d0d0;
}
.cg-btn-outline:hover {
	background: #f7f7f7;
	border-color: #bbb;
}

/* ========== MODAL ========== */
.consent-gate-modal {
	position: fixed;
	inset: 0;
	z-index: 1000000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}

.cg-modal-overlay {
	position: absolute;
	inset: 0;
	background: rgba(0,0,0,0.4);
}

.cg-modal-box {
	position: relative;
	background: #fff;
	border-radius: 14px;
	width: 100%;
	max-width: 480px;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 16px 48px rgba(0,0,0,0.18);
	color: var(--cg-text);
}

.cg-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 18px 20px 8px;
	font-size: 17px;
	font-weight: 600;
}

.cg-modal-close {
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: #888;
	padding: 0 4px;
}
.cg-modal-close:hover {
	color: #333;
}

.cg-modal-intro {
	padding: 0 20px 14px;
	font-size: 13.5px;
	line-height: 1.55;
	color: #555;
}
.cg-modal-intro a {
	color: #333;
	text-decoration: underline;
	text-underline-offset: 2px;
}

.cg-modal-body {
	padding: 0 8px 8px;
}

/* Accordion */
.cg-accordion {
	border-bottom: 1px solid #eee;
}
.cg-accordion:last-child {
	border-bottom: none;
}

.cg-acc-header {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
	padding: 14px 12px;
	background: none;
	border: none;
	cursor: pointer;
	text-align: left;
	font-size: 14px;
	font-weight: 500;
	color: var(--cg-text);
}

.cg-acc-chevron {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
	position: relative;
}
.cg-acc-chevron::before {
	content: '';
	position: absolute;
	top: 4px;
	left: 5px;
	width: 6px;
	height: 6px;
	border-right: 1.5px solid #888;
	border-bottom: 1.5px solid #888;
	transform: rotate(-45deg);
	transition: transform 0.2s;
}
.cg-accordion.open .cg-acc-chevron::before {
	transform: rotate(45deg);
	top: 3px;
}

.cg-acc-title {
	flex: 1;
	line-height: 1.35;
}

.cg-acc-status {
	font-size: 12px;
	color: #888;
	font-weight: 400;
	margin-right: 4px;
}

.cg-acc-body {
	display: none;
	padding: 0 14px 14px 36px;
	font-size: 13px;
	line-height: 1.55;
	color: #666;
}
.cg-accordion.open .cg-acc-body {
	display: block;
}
.cg-acc-body p {
	margin: 0;
}

/* Toggle switch */
.cg-switch {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
	margin-left: 8px;
}
.cg-switch input {
	opacity: 0;
	width: 0;
	height: 0;
}
.cg-slider {
	position: absolute;
	cursor: pointer;
	inset: 0;
	background: #ccc;
	border-radius: 22px;
	transition: 0.2s;
}
.cg-slider::before {
	content: '';
	position: absolute;
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
	background: #fff;
	border-radius: 50%;
	transition: 0.2s;
	box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.cg-switch input:checked + .cg-slider {
	background: #34c759;
}
.cg-switch input:checked + .cg-slider::before {
	transform: translateX(18px);
}

/* Footer buttons */
.cg-modal-footer {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 12px 16px 18px;
	justify-content: flex-end;
	border-top: 1px solid #f0f0f0;
}

/* Mobile */
@media (max-width: 480px) {
	.consent-gate-banner {
		left: 12px !important;
		right: 12px !important;
		bottom: 12px !important;
		max-width: none !important;
		width: auto;
	}
	.cg-modal-footer {
		flex-direction: column-reverse;
	}
	.cg-modal-footer .cg-btn {
		width: 100%;
		text-align: center;
	}
	.cg-banner-actions {
		flex-direction: column;
	}
	.cg-banner-actions .cg-btn {
		width: 100%;
		text-align: center;
	}
}
