/* ==========================================================================
   Simple Cookie Consent – Banner Styles (Mobile-First)
   Borlabs-inspired modal with tabs, service details, cookie info
   ========================================================================== */

:root {
	--scc-primary: #2563eb;
	--scc-link: #1d4ed8;
	--scc-bg: #fff;
	--scc-text: #1f2937;
	--scc-text-light: #6b7280;
	--scc-border: #e5e7eb;
	--scc-bg-subtle: #f9fafb;
	--scc-radius: 8px;
}

/* ---- Reset within banner ---- */

#scc-banner *,
#scc-banner *::before,
#scc-banner *::after {
	box-sizing: border-box;
}

/* ---- Overlay ---- */

.scc-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	z-index: 999998;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scc-overlay--visible {
	opacity: 1;
	visibility: visible;
}

/* ---- Banner / Modal ---- */

.scc-banner {
	position: fixed;
	inset: 0;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	visibility: hidden;
	opacity: 0;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.scc-banner--visible {
	visibility: visible;
	opacity: 1;
}

.scc-banner__inner {
	background: var(--scc-bg);
	color: var(--scc-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 14px;
	line-height: 1.5;
	border-radius: 12px;
	box-shadow: 0 8px 40px rgba(0, 0, 0, 0.18);
	width: 100%;
	max-width: 860px;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: scale(0.95) translateY(20px);
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.scc-banner--visible .scc-banner__inner {
	transform: scale(1) translateY(0);
}

/* ---- Header ---- */

.scc-banner__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 0;
	gap: 16px;
	flex-wrap: wrap;
}

.scc-banner__title {
	font-size: 18px;
	font-weight: 700;
	margin: 0;
	color: #111827;
}

.scc-banner__header-links {
	display: flex;
	gap: 16px;
	font-size: 13px;
}

.scc-banner__header-links a {
	color: var(--scc-link);
	text-decoration: none;
}

.scc-banner__header-links a:hover {
	text-decoration: underline;
}

/* ---- Description ---- */

.scc-banner__desc {
	padding: 12px 24px 0;
	margin: 0;
	font-size: 13px;
	color: var(--scc-text-light);
}

/* ---- Tabs ---- */

.scc-tabs {
	display: flex;
	gap: 0;
	padding: 16px 24px 0;
	border-bottom: 2px solid var(--scc-border);
}

.scc-tab {
	padding: 10px 20px;
	font-size: 13px;
	font-weight: 600;
	font-family: inherit;
	border: none;
	background: none;
	color: var(--scc-text-light);
	cursor: pointer;
	border-bottom: 2px solid transparent;
	margin-bottom: -2px;
	transition: color 0.15s ease, border-color 0.15s ease;
	white-space: nowrap;
}

.scc-tab:hover {
	color: var(--scc-text);
}

.scc-tab--active {
	color: #fff;
	background: var(--scc-primary);
	border-radius: 6px 6px 0 0;
	border-bottom-color: var(--scc-primary);
}

.scc-tab:focus-visible {
	outline: 2px solid var(--scc-primary);
	outline-offset: -2px;
}

/* ---- Content scrollable area ---- */

.scc-banner__content {
	flex: 1;
	overflow-y: auto;
	padding: 16px 24px;
	min-height: 0;
}

/* ---- Tab panels ---- */

.scc-tab-panel {
	display: none;
}

.scc-tab-panel--active {
	display: block;
}

/* ---- Group (Service-Gruppen tab) ---- */

.scc-group {
	background: var(--scc-bg-subtle);
	border: 1px solid var(--scc-border);
	border-radius: var(--scc-radius);
	padding: 14px 16px;
	margin-bottom: 12px;
}

.scc-group:last-child {
	margin-bottom: 0;
}

.scc-group__header {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.scc-group__name {
	font-weight: 700;
	font-size: 14px;
	color: #111827;
}

.scc-group__desc {
	margin: 8px 0 0;
	font-size: 13px;
	color: var(--scc-text-light);
}

/* ---- Badge ---- */

.scc-badge {
	font-size: 11px;
	font-weight: 600;
	padding: 2px 10px;
	border-radius: 100px;
}

.scc-badge--active {
	background: #d1fae5;
	color: #065f46;
}

/* ---- Info toggle button ---- */

.scc-info-btn {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	font-size: 12px;
	font-family: inherit;
	color: var(--scc-link);
	background: none;
	border: none;
	cursor: pointer;
	padding: 2px 4px;
	margin-left: auto;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.scc-info-btn:hover {
	color: var(--scc-primary);
}

.scc-info-btn--small {
	font-size: 11px;
}

.scc-info-btn__arrow {
	transition: transform 0.2s ease;
	flex-shrink: 0;
}

/* ---- Services inside group ---- */

.scc-group__services {
	margin-top: 12px;
	border-top: 1px solid var(--scc-border);
	padding-top: 12px;
}

.scc-service {
	padding: 10px 0;
	border-bottom: 1px solid var(--scc-border);
}

.scc-service:last-child {
	border-bottom: none;
	padding-bottom: 0;
}

.scc-service__header {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.scc-service__name {
	font-weight: 600;
	font-size: 13px;
	color: var(--scc-text);
}

.scc-service__status {
	font-size: 12px;
	color: var(--scc-text-light);
	min-width: 28px;
}

/* ---- Service details table ---- */

.scc-service__details,
.scc-service-flat__details {
	margin-top: 10px;
}

.scc-detail-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.scc-detail-table th,
.scc-detail-table td {
	padding: 8px 10px;
	border-bottom: 1px solid var(--scc-border);
	vertical-align: top;
	text-align: left;
}

.scc-detail-table th {
	width: 110px;
	font-weight: 600;
	color: var(--scc-text);
	background: var(--scc-bg-subtle);
	white-space: nowrap;
}

.scc-detail-table td {
	color: var(--scc-text-light);
}

/* ---- Cookie info rows ---- */

.scc-cookie-info {
	margin-bottom: 4px;
}

.scc-cookie-row {
	font-size: 12px;
	line-height: 1.6;
}

.scc-cookie-row strong {
	color: var(--scc-text);
	font-weight: 600;
}

.scc-cookie-sep {
	border: none;
	border-top: 1px dashed var(--scc-border);
	margin: 8px 0;
}

/* ---- Flat services tab ---- */

.scc-service-flat {
	padding: 12px 0;
	border-bottom: 1px solid var(--scc-border);
}

.scc-service-flat:last-child {
	border-bottom: none;
}

.scc-service-flat__header {
	display: flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.scc-service-flat__name {
	font-weight: 600;
	font-size: 14px;
	color: var(--scc-text);
}

.scc-service-flat__status {
	font-size: 12px;
	color: var(--scc-text-light);
	min-width: 28px;
}

/* ---- History tab ---- */

.scc-history {
	font-size: 13px;
}

.scc-history__empty {
	color: var(--scc-text-light);
	font-style: italic;
	margin: 0;
}

.scc-history-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 13px;
}

.scc-history-table th,
.scc-history-table td {
	padding: 8px 12px;
	text-align: center;
	border-bottom: 1px solid var(--scc-border);
}

.scc-history-table th {
	font-weight: 600;
	background: var(--scc-bg-subtle);
	color: var(--scc-text);
}

.scc-history-table td:first-child,
.scc-history-table th:first-child {
	text-align: left;
}

.scc-history-check {
	color: #059669;
	font-weight: 700;
}

.scc-history-cross {
	color: #dc2626;
	font-weight: 700;
}

/* ---- Toggle switch ---- */

.scc-toggle {
	position: relative;
	display: inline-block;
	width: 40px;
	height: 22px;
	flex-shrink: 0;
	cursor: pointer;
}

.scc-toggle--small {
	width: 34px;
	height: 18px;
}

.scc-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
	position: absolute;
}

.scc-toggle__slider {
	position: absolute;
	inset: 0;
	background: #d1d5db;
	border-radius: 22px;
	transition: background 0.2s ease;
}

.scc-toggle__slider::before {
	content: '';
	position: absolute;
	top: 2px;
	left: 2px;
	width: 18px;
	height: 18px;
	background: #fff;
	border-radius: 50%;
	transition: transform 0.2s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.scc-toggle--small .scc-toggle__slider::before {
	width: 14px;
	height: 14px;
}

.scc-toggle input:checked + .scc-toggle__slider {
	background: var(--scc-primary);
}

.scc-toggle input:checked + .scc-toggle__slider::before {
	transform: translateX(18px);
}

.scc-toggle--small input:checked + .scc-toggle__slider::before {
	transform: translateX(16px);
}

.scc-toggle input:disabled + .scc-toggle__slider {
	background: var(--scc-primary);
	opacity: 0.6;
	cursor: not-allowed;
}

.scc-toggle input:focus-visible + .scc-toggle__slider {
	outline: 2px solid var(--scc-primary);
	outline-offset: 2px;
}

/* ---- Buttons ---- */

.scc-banner__buttons {
	display: flex;
	gap: 8px;
	padding: 16px 24px;
	border-top: 1px solid var(--scc-border);
	flex-wrap: wrap;
}

.scc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 14px;
	font-weight: 600;
	padding: 10px 20px;
	border-radius: 6px;
	border: none;
	cursor: pointer;
	transition: background 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
	line-height: 1.4;
	font-family: inherit;
	flex: 1;
	min-width: 0;
	text-align: center;
}

.scc-btn:focus-visible {
	outline: 2px solid var(--scc-primary);
	outline-offset: 2px;
}

.scc-btn--primary {
	background: var(--scc-primary);
	color: #fff;
}

.scc-btn--primary:hover {
	filter: brightness(1.1);
}

.scc-btn--secondary {
	background: #e5e7eb;
	color: var(--scc-text);
}

.scc-btn--secondary:hover {
	background: #d1d5db;
}

.scc-btn--outline {
	background: var(--scc-primary);
	color: #fff;
}

.scc-btn--outline:hover {
	filter: brightness(1.1);
}

/* ---- Footer ---- */

.scc-banner__footer {
	text-align: center;
	padding: 10px 24px 16px;
	font-size: 11px;
	color: var(--scc-text-light);
}

.scc-banner__powered {
	opacity: 0.7;
}

/* ---- Re-open settings button ---- */

.scc-open-settings {
	position: fixed;
	bottom: 20px;
	left: 20px;
	z-index: 999997;
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background: var(--scc-primary);
	color: #fff;
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 2px 12px rgba(0, 0, 0, 0.25);
	transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.scc-open-settings:hover {
	transform: scale(1.12) rotate(-12deg);
	box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.scc-open-settings:focus-visible {
	outline: 2px solid var(--scc-primary);
	outline-offset: 2px;
}

/* ---- Content Blocker Placeholder ---- */

.scc-content-blocker {
	position: relative;
	width: 100%;
	min-height: 200px;
	background: #f3f4f6;
	border: 2px dashed #d1d5db;
	border-radius: var(--scc-radius);
	display: flex;
	align-items: center;
	justify-content: center;
}

.scc-content-blocker__inner {
	text-align: center;
	padding: 24px 16px;
	max-width: 400px;
}

.scc-content-blocker__text {
	font-size: 14px;
	color: var(--scc-text-light);
	margin: 0 0 16px 0;
	line-height: 1.5;
}

.scc-content-blocker__btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--scc-primary);
	color: #fff;
	border: none;
	padding: 8px 20px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	font-family: inherit;
	transition: filter 0.15s ease;
}

.scc-content-blocker__btn:hover {
	filter: brightness(1.1);
}

.scc-content-blocker__btn:focus-visible {
	outline: 2px solid var(--scc-primary);
	outline-offset: 2px;
}

/* ---- Body scroll lock ---- */

body.scc-banner-open {
	overflow: hidden;
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
	.scc-banner {
		padding: 8px;
	}

	.scc-banner__inner {
		border-radius: 10px;
		max-height: 95vh;
	}

	.scc-banner__header {
		padding: 16px 16px 0;
	}

	.scc-banner__desc {
		padding: 10px 16px 0;
	}

	.scc-tabs {
		padding: 12px 16px 0;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	.scc-tab {
		padding: 8px 12px;
		font-size: 12px;
	}

	.scc-banner__content {
		padding: 12px 16px;
	}

	.scc-banner__buttons {
		padding: 12px 16px;
		flex-direction: column;
	}

	.scc-btn {
		width: 100%;
		flex: none;
	}

	.scc-detail-table th {
		width: auto;
		display: block;
		border-bottom: none;
		padding-bottom: 2px;
	}

	.scc-detail-table td {
		display: block;
		padding-top: 0;
	}

	.scc-banner__header-links {
		font-size: 12px;
	}
}

@media (min-width: 641px) {
	.scc-banner__title {
		font-size: 20px;
	}

	.scc-banner__buttons {
		flex-wrap: nowrap;
	}
}
