/* Universal Cookie Scanner & Auto Blocker — banner styles. */

.ucsab-banner {
	position: fixed;
	z-index: 999990;
	background: var(--ucsab-bg, #fff);
	color: var(--ucsab-text, #1e1e1e);
	box-shadow: 0 -2px 24px rgba(0, 0, 0, 0.18);
	font-size: 14px;
	line-height: 1.5;
	max-height: 90vh;
	overflow-y: auto;
}

.ucsab-banner[hidden],
.ucsab-preferences[hidden],
.ucsab-reopen[hidden] {
	display: none !important;
}

/* Layouts */
.ucsab-layout-bar { left: 0; right: 0; }
.ucsab-layout-bar.ucsab-pos-bottom { bottom: 0; }
.ucsab-layout-bar.ucsab-pos-top { top: 0; box-shadow: 0 2px 24px rgba(0, 0, 0, 0.18); }

.ucsab-layout-box {
	max-width: 420px;
	border-radius: 10px;
	left: 20px;
}
.ucsab-layout-box.ucsab-pos-bottom { bottom: 20px; }
.ucsab-layout-box.ucsab-pos-top { top: 20px; }

.ucsab-layout-popup {
	max-width: 560px;
	width: calc(100% - 40px);
	border-radius: 12px;
	left: 50%;
	top: 50%;
	transform: translate(-50%, -50%);
}

.ucsab-banner-inner {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	align-items: center;
	justify-content: space-between;
	padding: 18px 24px;
}

.ucsab-layout-box .ucsab-banner-inner,
.ucsab-layout-popup .ucsab-banner-inner {
	flex-direction: column;
	align-items: flex-start;
}

.ucsab-banner-text { flex: 1 1 320px; min-width: 260px; }

.ucsab-title {
	margin: 0 0 6px;
	font-size: 16px;
	font-weight: 700;
	color: inherit;
}

.ucsab-message { margin: 0; }

.ucsab-policy-link {
	color: var(--ucsab-primary, #2271b1);
	text-decoration: underline;
	margin-left: 4px;
}

.ucsab-banner-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	padding: 0;
}

.ucsab-btn {
	border: 1px solid transparent;
	border-radius: 6px;
	cursor: pointer;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 18px;
	transition: opacity 0.15s ease;
}

.ucsab-btn:hover { opacity: 0.85; }
.ucsab-btn:focus-visible { outline: 2px solid var(--ucsab-primary, #2271b1); outline-offset: 2px; }

.ucsab-btn-primary {
	background: var(--ucsab-primary, #2271b1);
	color: #fff;
}

.ucsab-btn-secondary {
	background: transparent;
	border-color: currentColor;
	color: inherit;
}

.ucsab-btn-outline {
	background: transparent;
	border-color: var(--ucsab-primary, #2271b1);
	color: var(--ucsab-primary, #2271b1);
}

/* Preferences panel */
.ucsab-preferences {
	border-top: 1px solid rgba(0, 0, 0, 0.1);
	padding: 18px 24px;
}

.ucsab-category { margin-bottom: 14px; }

.ucsab-category-head {
	display: flex;
	align-items: center;
	gap: 10px;
}

.ucsab-category-desc {
	margin: 4px 0 0 54px;
	opacity: 0.8;
}

.ucsab-always {
	font-size: 12px;
	color: var(--ucsab-primary, #2271b1);
	font-style: normal;
	font-weight: 600;
}

/* Toggle switch */
.ucsab-switch {
	position: relative;
	display: inline-block;
	width: 44px;
	height: 24px;
	flex: 0 0 44px;
}

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

.ucsab-slider {
	position: absolute;
	inset: 0;
	background: #c3c4c7;
	border-radius: 24px;
	transition: background 0.15s ease;
}

.ucsab-slider::before {
	content: "";
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	top: 3px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.15s ease;
}

.ucsab-switch input:checked + .ucsab-slider { background: var(--ucsab-primary, #2271b1); }
.ucsab-switch input:checked + .ucsab-slider::before { transform: translateX(20px); }
.ucsab-switch input:disabled + .ucsab-slider { opacity: 0.6; cursor: not-allowed; }

.ucsab-dns-row { margin: 6px 0 12px; }

.ucsab-link {
	background: none;
	border: none;
	padding: 0;
	color: var(--ucsab-primary, #2271b1);
	text-decoration: underline;
	cursor: pointer;
	font-size: inherit;
}

/* Floating reopen button */
.ucsab-reopen {
	position: fixed;
	top: var(--ucsab-reopen-top, auto);
	right: var(--ucsab-reopen-right, 29px);
	bottom: var(--ucsab-reopen-bottom, 14px);
	left: var(--ucsab-reopen-left, auto);
	z-index: 999980;
	width: 46px;
	height: 46px;
	border-radius: 50%;
	border: none;
	background: var(--ucsab-primary, #2271b1);
	color: #fff;
	font-size: 22px;
	cursor: pointer;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

/* Iframe placeholder */
.ucsab-iframe-placeholder {
	background: #f0f0f1;
	border: 1px dashed #c3c4c7;
	border-radius: 8px;
	padding: 28px 20px;
	text-align: center;
	color: #50575e;
	margin: 8px 0;
}

.ucsab-iframe-placeholder .ucsab-unlock {
	background: var(--ucsab-primary, #2271b1);
	color: #fff;
	border: none;
	border-radius: 6px;
	padding: 9px 16px;
	font-weight: 600;
	cursor: pointer;
}

/* Policy tables */
.ucsab-table-wrap { overflow-x: auto; }

.ucsab-policy-table {
	width: 100%;
	border-collapse: collapse;
	margin: 12px 0 24px;
}

.ucsab-policy-table th,
.ucsab-policy-table td {
	border: 1px solid #dcdcde;
	padding: 8px 10px;
	text-align: left;
	vertical-align: top;
}

.ucsab-policy-table th { background: #f6f7f7; }

@media (max-width: 600px) {
	.ucsab-banner-inner { flex-direction: column; align-items: stretch; }
	.ucsab-banner-actions { justify-content: stretch; }
	.ucsab-btn { flex: 1 1 auto; }
	.ucsab-layout-box { left: 10px; right: 10px; max-width: none; }
}
