/**
 * V-CookieConsent – Cookie Banner Styles
 *
 * Design angepasst an vidacta-schulen.de
 * Primary: #1D2151 | Secondary: #73B1D1 | Accent: #59B78D | Font: Raleway
 *
 * @package V_CookieConsent
 */

/* === CSS Variables === */
:root {
	--vcc-primary: #1D2151;
	--vcc-secondary: #73B1D1;
	--vcc-accent: #59B78D;
	--vcc-white: #FFFFFF;
	--vcc-bg: #F8F9FA;
	--vcc-text: #1D2151;
	--vcc-text-light: #6B7280;
	--vcc-border: #E5E7EB;
	--vcc-shadow: 0 20px 60px rgba(29, 33, 81, 0.3);
	--vcc-radius: 12px;
	--vcc-radius-sm: 6px;
	--vcc-font: 'Raleway', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	--vcc-transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* === Overlay === */
.vcc-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(29, 33, 81, 0.5);
	z-index: 999999;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--vcc-transition), visibility var(--vcc-transition);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
}

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

/* === Banner (Modal) === */
.vcc-banner {
	position: fixed;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%) scale(0.95);
	width: 90%;
	max-width: 680px;
	max-height: 85vh;
	max-height: 85dvh; /* dynamische Viewport-Höhe: berücksichtigt mobile Browser-Leisten */
	background: var(--vcc-white);
	border-radius: var(--vcc-radius);
	box-shadow: var(--vcc-shadow);
	z-index: 1000000;
	opacity: 0;
	visibility: hidden;
	transition: opacity var(--vcc-transition), visibility var(--vcc-transition), transform var(--vcc-transition);
	display: flex;
	flex-direction: column;
	font-family: var(--vcc-font);
	color: var(--vcc-text);
	overflow: hidden;
}

.vcc-banner.vcc-visible {
	opacity: 1;
	visibility: visible;
	transform: translate(-50%, -50%) scale(1);
}

/* Feste Bereiche dürfen nicht gestaucht werden — bei Platzmangel schrumpft/scrollt
   ausschließlich .vcc-tabs-content (flex: 1). Ohne flex-shrink: 0 quetscht Flexbox
   sonst Tab-Leiste und Footer zusammen (Mobile-Bug 2026-07-16). */
.vcc-banner-header,
.vcc-banner-desc,
.vcc-tabs-nav,
.vcc-banner-footer {
	flex-shrink: 0;
}

/* === Banner Header === */
.vcc-banner-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px 16px;
	border-bottom: 1px solid var(--vcc-border);
}

.vcc-banner-header-left {
	display: flex;
	align-items: center;
	gap: 12px;
}

.vcc-banner-logo {
	width: 32px;
	height: 32px;
}

.vcc-banner-logo svg {
	width: 100%;
	height: 100%;
}

.vcc-banner-title {
	font-size: 20px;
	font-weight: 700;
	color: var(--vcc-primary);
	margin: 0;
	letter-spacing: -0.3px;
}

.vcc-banner-links {
	display: flex;
	gap: 16px;
}

.vcc-banner-links a {
	font-size: 12px;
	color: var(--vcc-text-light);
	text-decoration: none;
	font-weight: 500;
	transition: color var(--vcc-transition);
}

.vcc-banner-links a:hover {
	color: var(--vcc-secondary);
}

/* === Banner Description === */
.vcc-banner-desc {
	padding: 16px 24px;
	font-size: 13px;
	line-height: 1.6;
	color: var(--vcc-text-light);
}

/* === Tabs === */
.vcc-tabs-nav {
	display: flex;
	padding: 0 24px;
	gap: 0;
	border-bottom: 2px solid var(--vcc-border);
}

.vcc-tab-btn {
	background: none;
	border: none;
	padding: 10px 20px;
	font-size: 13px;
	font-weight: 600;
	color: var(--vcc-text-light);
	cursor: pointer;
	position: relative;
	font-family: var(--vcc-font);
	transition: color var(--vcc-transition);
	white-space: nowrap;
}

.vcc-tab-btn::after {
	content: '';
	position: absolute;
	bottom: -2px;
	left: 0;
	width: 100%;
	height: 2px;
	background: transparent;
	transition: background var(--vcc-transition);
}

.vcc-tab-btn:hover {
	color: var(--vcc-primary);
}

.vcc-tab-btn.vcc-active {
	color: var(--vcc-white);
	background: var(--vcc-primary);
	border-radius: var(--vcc-radius-sm) var(--vcc-radius-sm) 0 0;
}

.vcc-tab-btn.vcc-active::after {
	background: var(--vcc-primary);
}

/* === Tab Content === */
.vcc-tabs-content {
	flex: 1;
	overflow-y: auto;
	padding: 0;
	min-height: 0;
}

.vcc-tab-panel {
	display: none;
	padding: 16px 24px;
}

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

/* === Scrollbar Styling === */
.vcc-tabs-content::-webkit-scrollbar {
	width: 6px;
}

.vcc-tabs-content::-webkit-scrollbar-track {
	background: transparent;
}

.vcc-tabs-content::-webkit-scrollbar-thumb {
	background: rgba(29, 33, 81, 0.15);
	border-radius: 3px;
}

.vcc-tabs-content::-webkit-scrollbar-thumb:hover {
	background: rgba(29, 33, 81, 0.3);
}

/* === Select All / Deselect All === */
.vcc-select-actions {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	margin-bottom: 12px;
}

.vcc-select-btn {
	background: none;
	border: 1px solid var(--vcc-border);
	border-radius: 20px;
	padding: 5px 14px;
	font-size: 12px;
	font-weight: 500;
	color: var(--vcc-text-light);
	cursor: pointer;
	font-family: var(--vcc-font);
	transition: all var(--vcc-transition);
}

.vcc-select-btn:hover {
	border-color: var(--vcc-secondary);
	color: var(--vcc-secondary);
}

/* === Category Card === */
.vcc-category {
	background: var(--vcc-bg);
	border-radius: var(--vcc-radius-sm);
	padding: 16px;
	margin-bottom: 10px;
}

.vcc-category-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.vcc-category-left {
	display: flex;
	align-items: center;
	gap: 10px;
	flex: 1;
}

.vcc-category-toggle {
	position: relative;
	width: 44px;
	height: 24px;
	flex-shrink: 0;
}

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

.vcc-category-toggle .vcc-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: #D1D5DB;
	border-radius: 24px;
	transition: var(--vcc-transition);
}

.vcc-category-toggle .vcc-slider::before {
	content: '';
	position: absolute;
	height: 18px;
	width: 18px;
	left: 3px;
	bottom: 3px;
	background-color: var(--vcc-white);
	border-radius: 50%;
	transition: var(--vcc-transition);
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

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

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

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

.vcc-category-name {
	font-size: 15px;
	font-weight: 700;
	color: var(--vcc-primary);
}

.vcc-category-desc {
	font-size: 12px;
	line-height: 1.5;
	color: var(--vcc-text-light);
	margin-top: 8px;
}

.vcc-category-details-btn {
	background: none;
	border: none;
	font-size: 12px;
	color: var(--vcc-secondary);
	cursor: pointer;
	font-family: var(--vcc-font);
	font-weight: 500;
	padding: 0;
	display: flex;
	align-items: center;
	gap: 4px;
	white-space: nowrap;
}

.vcc-category-details-btn:hover {
	color: var(--vcc-primary);
}

.vcc-category-details-btn .vcc-chevron {
	transition: transform var(--vcc-transition);
	font-size: 10px;
}

.vcc-category-details-btn.vcc-open .vcc-chevron {
	transform: rotate(180deg);
}

/* === Service List (within category) === */
.vcc-services-list {
	display: none;
	margin-top: 12px;
	border-top: 1px solid var(--vcc-border);
	padding-top: 12px;
}

.vcc-services-list.vcc-visible {
	display: block;
}

.vcc-service-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 8px 0;
	border-bottom: 1px solid rgba(229, 231, 235, 0.5);
}

.vcc-service-item:last-child {
	border-bottom: none;
}

.vcc-service-info {
	flex: 1;
}

.vcc-service-item-name {
	font-size: 13px;
	font-weight: 600;
	color: var(--vcc-primary);
}

.vcc-service-item-desc {
	font-size: 11px;
	color: var(--vcc-text-light);
	margin-top: 2px;
}

.vcc-service-item-provider {
	font-size: 11px;
	color: var(--vcc-text-light);
	margin-top: 2px;
	font-style: italic;
}

/* Service-Toggles entfernt 2026-07-15 (waren funktionslose Attrappen; Consent gilt pro Kategorie). */

/* === Banner Footer (Buttons) === */
.vcc-banner-footer {
	display: flex;
	gap: 10px;
	padding: 16px 24px 20px;
	border-top: 1px solid var(--vcc-border);
}

.vcc-btn {
	flex: 1;
	padding: 12px 16px;
	font-size: 13px;
	font-weight: 600;
	border: none;
	border-radius: var(--vcc-radius-sm);
	cursor: pointer;
	font-family: var(--vcc-font);
	transition: all var(--vcc-transition);
	text-align: center;
	letter-spacing: 0.2px;
}

.vcc-btn-save {
	background: var(--vcc-white);
	color: var(--vcc-primary);
	border: 1.5px solid var(--vcc-border);
}

.vcc-btn-save:hover {
	background: var(--vcc-bg);
	transform: translateY(-1px);
}

.vcc-btn-accept-all {
	background: var(--vcc-secondary);
	color: var(--vcc-white);
}

.vcc-btn-accept-all:hover {
	background: #5fa3c4;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(115, 177, 209, 0.3);
}

/* TDDDG-Button-Paritaet (2026-07-15): Ablehnen ist gleichwertig gefuellt wie Akzeptieren. */
.vcc-btn-essential {
	background: var(--vcc-primary);
	color: var(--vcc-white);
}

.vcc-btn-essential:hover {
	background: #2a2f6e;
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(29, 33, 81, 0.2);
}

/* === Cookie Settings Icon (Floating) === */
.vcc-settings-icon {
	position: fixed;
	bottom: 20px;
	left: 20px;
	width: 44px;
	height: 44px;
	background: var(--vcc-primary);
	border: none;
	border-radius: 50%;
	cursor: pointer;
	z-index: 999998;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(29, 33, 81, 0.25);
	transition: all var(--vcc-transition);
	opacity: 0;
	visibility: hidden;
	transform: scale(0.8);
}

.vcc-settings-icon.vcc-visible {
	opacity: 1;
	visibility: visible;
	transform: scale(1);
}

.vcc-settings-icon:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(29, 33, 81, 0.35);
}

.vcc-settings-icon svg {
	width: 22px;
	height: 22px;
	fill: var(--vcc-white);
	animation: vcc-rotate 8s linear infinite;
}

@keyframes vcc-rotate {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.vcc-settings-icon:hover svg {
	animation-duration: 2s;
}

/* === Iframe Placeholder === */
.vcc-iframe-placeholder {
	background: var(--vcc-bg);
	border: 2px dashed var(--vcc-border);
	border-radius: var(--vcc-radius-sm);
	padding: 40px 20px;
	text-align: center;
	font-family: var(--vcc-font);
	color: var(--vcc-text-light);
}

.vcc-iframe-placeholder-content svg {
	color: var(--vcc-secondary);
	margin-bottom: 12px;
}

.vcc-iframe-placeholder-content p {
	font-size: 13px;
	line-height: 1.5;
	margin: 4px 0;
}

.vcc-accept-category-btn {
	margin-top: 12px;
	padding: 8px 20px;
	background: var(--vcc-secondary);
	color: var(--vcc-white);
	border: none;
	border-radius: var(--vcc-radius-sm);
	cursor: pointer;
	font-family: var(--vcc-font);
	font-weight: 600;
	font-size: 13px;
	transition: all var(--vcc-transition);
}

.vcc-accept-category-btn:hover {
	background: var(--vcc-primary);
}

/* === Embed-Platzhalter (script-basierte Embeds: HubSpot-Formulare, Trustpilot …) ===
   Erbt die Optik von .vcc-iframe-placeholder (beide Klassen am Element);
   hier nur die kompaktere Variante + Abstand im Content-Fluss. */
.vcc-embed-placeholder {
	padding: 28px 20px;
	margin: 12px 0;
}

/* === Floating-Hint (Widgets ohne Content-Container, z.B. Voice-Assistent) === */
.vcc-embed-hint {
	position: fixed;
	bottom: 20px;
	right: 20px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	padding: 10px 16px;
	border-radius: 999px;
	box-shadow: var(--vcc-shadow);
	z-index: 999998; /* wie das Settings-Icon, unterhalb des Banners */
	opacity: 0.92;
}

.vcc-embed-hint:hover {
	opacity: 1;
}

.vcc-embed-hint svg {
	flex-shrink: 0;
}

@media (max-width: 640px) {
	.vcc-embed-hint {
		bottom: 16px;
		right: 16px;
		padding: 9px 14px;
		font-size: 12px;
	}
}

/* === Responsive === */
@media (max-width: 640px) {
	.vcc-banner {
		width: 95%;
		max-height: 90vh;
		max-height: 90dvh;
	}

	.vcc-banner-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
		padding: 16px 18px 12px;
	}

	.vcc-banner-links {
		align-self: flex-end;
	}

	.vcc-banner-desc {
		padding: 12px 18px;
		font-size: 12px;
	}

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

	.vcc-tab-btn {
		padding: 8px 14px;
		font-size: 12px;
	}

	.vcc-tab-panel {
		padding: 12px 18px;
	}

	.vcc-banner-footer {
		flex-direction: column;
		padding: 12px 18px 16px;
	}

	.vcc-btn {
		padding: 11px 16px;
	}

	.vcc-banner-title {
		font-size: 17px;
	}
}

/* === Divi Theme Overrides === */
body.et-db #et-boc .vcc-banner,
body.et_divi_theme .vcc-banner {
	text-align: left !important;
}

body.et-db #et-boc .vcc-banner *,
body.et_divi_theme .vcc-banner * {
	text-align: left !important;
	box-sizing: border-box !important;
}

body.et-db #et-boc .vcc-btn,
body.et_divi_theme .vcc-btn {
	text-align: center !important;
}

/* === A11y: sichtbarer Tastatur-Fokus (2026-07-15) === */
.vcc-banner button:focus-visible,
.vcc-banner input:focus-visible + .vcc-slider,
.vcc-banner a:focus-visible,
.vcc-settings-icon:focus-visible {
	outline: 3px solid #73B1D1;
	outline-offset: 2px;
}
