/**
 * Banner Styles
 *
 * @package RG\GCB
 */

:root {
	--gcb-bg: #ffffff;
	--gcb-text: #333333;
	--gcb-accent: #0073aa;
	--gcb-border: #cccccc;
	--gcb-radius: 4px;
	--gcb-font: inherit;
	--gcb-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
	--gcb-button-bg: var(--gcb-bg);
	--gcb-button-text: var(--gcb-text);
	--gcb-button-hover-bg: #f5f5f5;
}

/* Theme adaptation - these will be overridden by JS if theme colors are detected */
.gcb-enabled {
	/* Fallback values, will be set dynamically */
}

/* Banner Layer 1 */
.gcb-banner {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	background: var(--gcb-bg);
	border-top: 1px solid var(--gcb-border);
	box-shadow: var(--gcb-shadow);
	z-index: 999999;
	transform: translateY(100%);
	transition: transform 0.3s ease-in-out;
	font-family: var(--gcb-font);
}

.gcb-banner.gcb-banner-visible {
	transform: translateY(0);
}

.gcb-banner-content {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
	display: flex;
	flex-wrap: wrap;
	gap: 20px;
	align-items: center;
	justify-content: space-between;
}

.gcb-banner-text {
	flex: 1;
	min-width: 250px;
}

.gcb-banner-title {
	margin: 0 0 10px;
	font-size: 18px;
	font-weight: 600;
	color: var(--gcb-text);
}

.gcb-banner-description {
	margin: 0 0 10px;
	font-size: 14px;
	color: var(--gcb-text);
	line-height: 1.5;
}

.gcb-banner-links {
	display: flex;
	gap: 15px;
	flex-wrap: wrap;
}

.gcb-link {
	color: var(--gcb-accent);
	text-decoration: underline;
	font-size: 13px;
}

.gcb-link:hover {
	text-decoration: none;
}

.gcb-banner-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
}

.gcb-button {
	padding: 10px 20px;
	border: 1px solid var(--gcb-border);
	border-radius: var(--gcb-radius);
	background: var(--gcb-button-bg);
	color: var(--gcb-button-text);
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: var(--gcb-font);
}

.gcb-button:hover {
	background: var(--gcb-button-hover-bg);
}

.gcb-button:focus {
	outline: 2px solid var(--gcb-accent);
	outline-offset: 2px;
}

.gcb-button-accept {
	background: var(--gcb-accent);
	color: #ffffff;
	border-color: var(--gcb-accent);
}

.gcb-button-accept:hover {
	background: #005a87;
	border-color: #005a87;
}

.gcb-button-reject {
	background: transparent;
	color: var(--gcb-text);
}

.gcb-button-reject:hover {
	background: #f5f5f5;
}

.gcb-button-settings {
	background: transparent;
	color: var(--gcb-accent);
	border-color: var(--gcb-accent);
}

.gcb-button-settings:hover {
	background: var(--gcb-accent);
	color: #ffffff;
}

/* Preferences Center (Layer 2) */
.gcb-preferences {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gcb-preferences-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
}

.gcb-preferences-content {
	position: relative;
	background: var(--gcb-bg);
	border-radius: var(--gcb-radius);
	box-shadow: var(--gcb-shadow);
	max-width: 600px;
	width: 90%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.gcb-preferences-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 20px;
	border-bottom: 1px solid var(--gcb-border);
}

.gcb-preferences-title {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: var(--gcb-text);
}

.gcb-close {
	background: none;
	border: none;
	font-size: 24px;
	color: var(--gcb-text);
	cursor: pointer;
	padding: 0;
	width: 30px;
	height: 30px;
	display: flex;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.gcb-close:hover {
	color: var(--gcb-accent);
}

.gcb-close:focus {
	outline: 2px solid var(--gcb-accent);
	outline-offset: 2px;
	border-radius: var(--gcb-radius);
}

.gcb-preferences-body {
	padding: 20px;
	overflow-y: auto;
	flex: 1;
}

.gcb-preferences-description {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--gcb-text);
	line-height: 1.5;
}

.gcb-categories {
	display: flex;
	flex-direction: column;
	gap: 20px;
}

.gcb-category {
	border: 1px solid var(--gcb-border);
	border-radius: var(--gcb-radius);
	padding: 15px;
}

.gcb-category-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.gcb-category-title {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--gcb-text);
}

.gcb-toggle {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
}

.gcb-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.gcb-toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #ccc;
	transition: 0.3s;
	border-radius: 24px;
}

.gcb-toggle-slider:before {
	position: absolute;
	content: "";
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: white;
	transition: 0.3s;
	border-radius: 50%;
}

.gcb-toggle input:checked + .gcb-toggle-slider {
	background-color: var(--gcb-accent);
}

.gcb-toggle input:checked + .gcb-toggle-slider:before {
	transform: translateX(20px);
}

.gcb-toggle input:disabled + .gcb-toggle-slider {
	opacity: 0.6;
	cursor: not-allowed;
}

.gcb-category-description {
	margin: 0;
	font-size: 13px;
	color: var(--gcb-text);
	line-height: 1.5;
}

.gcb-preferences-footer {
	display: flex;
	gap: 10px;
	padding: 20px;
	border-top: 1px solid var(--gcb-border);
	flex-wrap: wrap;
}

.gcb-button-save {
	background: var(--gcb-accent);
	color: #ffffff;
	border-color: var(--gcb-accent);
}

.gcb-button-save:hover {
	background: #005a87;
	border-color: #005a87;
}

/* Placeholders */
.gcb-placeholder {
	position: relative;
	min-height: 200px;
	border: 1px solid var(--gcb-border);
	border-radius: var(--gcb-radius);
	background: var(--gcb-bg, #f5f5f5);
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 20px 0;
	font-family: var(--gcb-font);
}

.gcb-placeholder-content {
	text-align: center;
	padding: 40px 20px;
}

.gcb-placeholder-icon {
	font-size: 48px;
	margin-bottom: 15px;
	opacity: 0.5;
	color: var(--gcb-text);
}

.gcb-placeholder-text {
	margin: 0 0 20px;
	font-size: 14px;
	color: var(--gcb-text);
	line-height: 1.5;
}

.gcb-placeholder-button {
	padding: 10px 20px;
	background: var(--gcb-accent);
	color: #ffffff;
	border: 1px solid var(--gcb-accent);
	border-radius: var(--gcb-radius);
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	font-family: var(--gcb-font);
	transition: all 0.2s ease;
}

.gcb-placeholder-button:hover {
	background: var(--gcb-button-hover-bg, #005a87);
	border-color: var(--gcb-button-hover-bg, #005a87);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.gcb-placeholder-button:focus {
	outline: 2px solid var(--gcb-accent);
	outline-offset: 2px;
}

/* US Opt-Out */
.gcb-us-optout {
	margin: 20px 0;
	padding: 20px;
	border: 1px solid var(--gcb-border);
	border-radius: var(--gcb-radius);
	background: var(--gcb-bg);
}

.gcb-us-optout-content h2 {
	margin: 0 0 15px;
	font-size: 18px;
	font-weight: 600;
	color: var(--gcb-text);
}

.gcb-us-optout-content p {
	margin: 0 0 15px;
	font-size: 14px;
	color: var(--gcb-text);
	line-height: 1.5;
}

.gcb-us-optout-actions {
	margin: 15px 0;
}

.gcb-toggle-label {
	margin-left: 10px;
	font-size: 14px;
	color: var(--gcb-text);
}

.gcb-gpc-notice {
	margin-top: 15px;
	padding: 10px;
	background: #e7f3ff;
	border-left: 4px solid var(--gcb-accent);
	border-radius: var(--gcb-radius);
}

.gcb-gpc-notice p {
	margin: 0;
	font-size: 13px;
	color: var(--gcb-text);
}

/* Mobile Responsive */
@media (max-width: 768px) {
	.gcb-banner-content {
		flex-direction: column;
		align-items: flex-start;
	}

	.gcb-banner-actions {
		width: 100%;
	}

	.gcb-button {
		flex: 1;
		min-width: 100px;
	}

	.gcb-preferences-content {
		width: 100%;
		max-height: 100vh;
		border-radius: 0;
	}

	.gcb-preferences-footer {
		flex-direction: column;
	}

	.gcb-button {
		width: 100%;
	}
}

/* Cookie Settings Link (always visible after consent) */
.gcb-settings-link {
	position: fixed !important;
	bottom: 20px !important;
	right: 20px !important;
	z-index: 9999999 !important; /* Higher than banner */
	display: none; /* Hidden by default, shown by JavaScript when consent exists */
	visibility: visible !important;
	opacity: 1 !important;
	pointer-events: auto !important;
}

.gcb-settings-link-button {
	padding: 10px 20px;
	background: var(--gcb-accent, #0073aa) !important;
	color: #ffffff !important;
	border: 1px solid var(--gcb-accent, #0073aa) !important;
	border-radius: var(--gcb-radius, 4px);
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	font-family: var(--gcb-font, inherit);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
	visibility: visible !important;
	opacity: 1 !important;
	display: block !important;
}

.gcb-settings-link-button:hover {
	background: var(--gcb-accent, #005a87);
	border-color: var(--gcb-accent, #005a87);
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
	transform: translateY(-1px);
}

.gcb-settings-link-button:focus {
	outline: 2px solid var(--gcb-accent, #0073aa);
	outline-offset: 2px;
}

@media (max-width: 768px) {
	.gcb-settings-link {
		bottom: 10px;
		right: 10px;
	}
	
	.gcb-settings-link-button {
		padding: 8px 16px;
		font-size: 12px;
	}
}

