/*!
 * GDPR Consent Suite — Public banner stylesheet
 * Author: XaniaCode (https://xaniacode.com)
 *
 * The banner uses CSS variables so the admin-configurable primary color
 * flows through. All rules are scoped under .gcs-cb to avoid theme
 * collisions.
 */

#gcs-cb {
	--gcs-cb-bg:       #ffffff;
	--gcs-cb-fg:       #0F172A;
	--gcs-cb-fg2:      #475569;
	--gcs-cb-fg3:      #64748B;
	--gcs-cb-border:   #E2E8F0;
	--gcs-cb-card:     #F8FAFC;
	--gcs-cb-accent:   #3B82F6;
	--gcs-cb-accent-d: #1D4ED8;
	--gcs-cb-on-accent:#ffffff;
	--gcs-cb-shadow:   0 8px 32px rgba(15, 23, 42, .18);
	--gcs-cb-radius:   14px;

	position: fixed;
	z-index: 2147483646;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
	font-size: 14px;
	line-height: 1.5;
	color: var(--gcs-cb-fg);
}
#gcs-cb[hidden] { display: none; }

#gcs-cb.gcs-cb-theme-dark {
	--gcs-cb-bg:     #161B22;
	--gcs-cb-fg:     #F1F5F9;
	--gcs-cb-fg2:    #CBD5E1;
	--gcs-cb-fg3:    #94A3B8;
	--gcs-cb-border: #30363D;
	--gcs-cb-card:   #0D1117;
}
@media (prefers-color-scheme: dark) {
	#gcs-cb.gcs-cb-theme-auto {
		--gcs-cb-bg:     #161B22;
		--gcs-cb-fg:     #F1F5F9;
		--gcs-cb-fg2:    #CBD5E1;
		--gcs-cb-fg3:    #94A3B8;
		--gcs-cb-border: #30363D;
		--gcs-cb-card:   #0D1117;
	}
}

#gcs-cb *, #gcs-cb *::before, #gcs-cb *::after { box-sizing: border-box; }

.gcs-cb-inner {
	background: var(--gcs-cb-bg);
	border: 1px solid var(--gcs-cb-border);
	border-radius: var(--gcs-cb-radius);
	box-shadow: var(--gcs-cb-shadow);
	padding: 22px 24px;
	position: relative;
	max-height: calc(100vh - 40px);
	overflow-y: auto;
}

/* -- Positions -------------------------------------------------- */
#gcs-cb.gcs-cb-bottom-bar {
	left: 16px; right: 16px; bottom: 16px;
}
#gcs-cb.gcs-cb-bottom-bar .gcs-cb-inner { max-width: 1100px; margin: 0 auto; }

#gcs-cb.gcs-cb-bottom-right {
	right: 16px; bottom: 16px; max-width: 420px; width: calc(100% - 32px);
}

#gcs-cb.gcs-cb-top-bar {
	left: 16px; right: 16px; top: 16px;
}
#gcs-cb.gcs-cb-top-bar .gcs-cb-inner { max-width: 1100px; margin: 0 auto; }

#gcs-cb.gcs-cb-center-modal {
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(15, 23, 42, .55);
	padding: 20px;
}
#gcs-cb.gcs-cb-center-modal .gcs-cb-inner {
	max-width: 540px;
	width: 100%;
}

/* -- Content ---------------------------------------------------- */
.gcs-cb-close {
	position: absolute;
	top: 10px;
	right: 12px;
	background: transparent;
	border: 0;
	color: var(--gcs-cb-fg3);
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	padding: 4px 8px;
	border-radius: 6px;
}
.gcs-cb-close:hover { background: var(--gcs-cb-card); color: var(--gcs-cb-fg); }

.gcs-cb-head { margin-bottom: 14px; padding-right: 28px; }
.gcs-cb-title { font-size: 16px; font-weight: 700; color: var(--gcs-cb-fg); margin-bottom: 6px; }
.gcs-cb-text  { font-size: 13.5px; color: var(--gcs-cb-fg2); line-height: 1.55; }

.gcs-cb-purposes {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 14px 0 16px;
	padding: 14px;
	background: var(--gcs-cb-card);
	border: 1px solid var(--gcs-cb-border);
	border-radius: 10px;
	max-height: 50vh;
	overflow-y: auto;
}
.gcs-cb-purpose {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	padding: 10px 12px;
	background: var(--gcs-cb-bg);
	border: 1px solid var(--gcs-cb-border);
	border-radius: 8px;
}
.gcs-cb-purpose-info { flex: 1; min-width: 0; }
.gcs-cb-purpose-name { font-size: 13.5px; font-weight: 600; color: var(--gcs-cb-fg); margin-bottom: 2px; }
.gcs-cb-purpose-desc { font-size: 12px; color: var(--gcs-cb-fg3); line-height: 1.5; }

.gcs-cb-pill {
	display: inline-block;
	padding: 3px 9px;
	background: rgba(16, 185, 129, .12);
	color: #047857;
	border-radius: 12px;
	font-size: 11px;
	font-weight: 600;
	flex-shrink: 0;
}

.gcs-cb-toggle { position: relative; display: inline-block; width: 40px; height: 22px; flex-shrink: 0; }
.gcs-cb-toggle input { opacity: 0; width: 0; height: 0; }
.gcs-cb-toggle-slider {
	position: absolute;
	inset: 0;
	background: #CBD5E1;
	border-radius: 12px;
	cursor: pointer;
	transition: .2s;
}
.gcs-cb-toggle-slider::before {
	content: '';
	position: absolute;
	width: 16px;
	height: 16px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: .2s;
	box-shadow: 0 1px 3px rgba(0,0,0,.15);
}
.gcs-cb-toggle input:checked + .gcs-cb-toggle-slider { background: var(--gcs-cb-accent); }
.gcs-cb-toggle input:checked + .gcs-cb-toggle-slider::before { transform: translateX(18px); }

/* -- Actions ---------------------------------------------------- */
.gcs-cb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 4px;
}
.gcs-cb-btn {
	flex: 1 1 auto;
	min-width: 0;
	padding: 10px 18px;
	border-radius: 8px;
	font-size: 13.5px;
	font-weight: 600;
	cursor: pointer;
	border: 0;
	font-family: inherit;
	transition: filter .15s, background .15s, color .15s;
	white-space: nowrap;
}
.gcs-cb-btn-primary {
	background: var(--gcs-cb-accent);
	color: var(--gcs-cb-on-accent);
}
.gcs-cb-btn-primary:hover { filter: brightness(.92); }
.gcs-cb-btn-secondary {
	background: var(--gcs-cb-card);
	color: var(--gcs-cb-fg);
	border: 1.5px solid var(--gcs-cb-border);
}
.gcs-cb-btn-secondary:hover { background: var(--gcs-cb-bg); }
.gcs-cb-btn-link {
	background: transparent;
	color: var(--gcs-cb-accent);
	flex: 0 0 auto;
	padding: 10px 12px;
}
.gcs-cb-btn-link:hover { text-decoration: underline; }

.gcs-cb-policy {
	font-size: 11.5px;
	color: var(--gcs-cb-fg3);
	margin-top: 12px;
	line-height: 1.5;
}
.gcs-cb-policy a { color: var(--gcs-cb-accent); text-decoration: underline; }
.gcs-cb-policy a:hover { color: var(--gcs-cb-accent-d); }

/* -- "Manage cookies" trigger button (shortcode default) -------- */
.gcs-cb-trigger {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 14px;
	border-radius: 8px;
	background: transparent;
	color: inherit;
	border: 1.5px solid currentColor;
	font: inherit;
	cursor: pointer;
	opacity: .85;
}
.gcs-cb-trigger:hover { opacity: 1; }

/* -- Responsive ------------------------------------------------- */
@media (max-width: 640px) {
	.gcs-cb-inner { padding: 18px; }
	.gcs-cb-actions { flex-direction: column; }
	.gcs-cb-btn { flex: 1 1 100%; }
	.gcs-cb-btn-link { padding: 6px 0; text-align: center; }
	#gcs-cb.gcs-cb-bottom-right { left: 8px; right: 8px; bottom: 8px; max-width: none; width: auto; }
	#gcs-cb.gcs-cb-bottom-bar { left: 8px; right: 8px; bottom: 8px; }
	#gcs-cb.gcs-cb-top-bar    { left: 8px; right: 8px; top: 8px; }
	#gcs-cb.gcs-cb-center-modal { padding: 12px; }
}
