/**
 * Cookie Consent Banner Styles
 */

/* Banner Container */
.jhs-cookie-consent-banner {
	position: fixed;
	z-index: 9999;
	display: none;
	opacity: 0;
	transform: translateY(16px);
	background: linear-gradient(
		135deg,
		rgba(255, 255, 255, 0.94),
		rgba(255, 255, 255, 0.78)
	);
	color: var(--cc-text-color, #333333);
	border: 1px solid rgba(255, 255, 255, 0.45);
	box-shadow: 0 18px 40px rgba(15, 23, 42, 0.18);
	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: 18px;
	backdrop-filter: blur(18px);
	-webkit-backdrop-filter: blur(18px);
	transition: opacity 0.3s ease, transform 0.3s ease;
}

.jhs-cookie-consent-banner.is-visible {
	opacity: 1;
	transform: translateY(0);
}

/* Position Variants */
.jhs-cc-position-bottom {
	bottom: 20px;
	left: 20px;
	right: 20px;
}

.jhs-cc-position-top {
	top: 20px;
	left: 20px;
	right: 20px;
}

.jhs-cc-position-left {
	left: 20px;
	top: 50%;
	transform: translateY(-50%);
	max-width: 420px;
}

.jhs-cc-position-right {
	right: 20px;
	top: 50%;
	transform: translateY(-50%);
	max-width: 420px;
}

/* Content */
.jhs-cc-content {
	padding: 24px;
	max-width: 100%;
	display: grid;
	gap: 20px;
}

.jhs-cc-preferences-open .jhs-cc-content {
	padding-bottom: 26px;
}

.jhs-cc-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 20px;
}

.jhs-cc-logo {
	width: 200px;
	max-width: 100%;
	height: auto;
}

.jhs-cc-header h2 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: var(--cc-text-color, #333333);
}

.jhs-cc-close {
	background: none;
	border: none;
	font-size: 26px;
	cursor: pointer;
	color: var(--cc-text-color, #333333);
	padding: 4px;
	margin: -8px -8px 0 0;
	opacity: 0.65;
	transition: opacity 0.2s ease, transform 0.2s ease;
}

.jhs-cc-close:hover {
	opacity: 1;
	transform: scale(1.05);
}

.jhs-cc-body {
	display: grid;
	gap: 18px;
	margin-bottom: 12px;
}

.jhs-cc-body p {
	margin: 0 0 10px 0;
	color: rgba(51, 51, 51, 0.85);
}

.jhs-cc-body-summary[hidden] {
	display: none !important;
}

.jhs-cc-policy-link {
	color: var(--cc-button-color, #84B082);
	text-decoration: underline;
	transition: opacity 0.2s ease;
}

.jhs-cc-policy-link:hover {
	opacity: 0.8;
}

/* Footer with Buttons */
.jhs-cc-footer {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	justify-content: flex-end;
	align-items: center;
}

.jhs-cc-btn {
	padding: 11px 22px;
	border: none;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
}

.jhs-cc-btn-accept {
	background-color: var(--cc-button-color, #84B082);
	color: var(--cc-button-text-color, #ffffff);
	box-shadow: 0 8px 20px rgba(132, 176, 130, 0.32);
}

.jhs-cc-btn-accept:hover {
	box-shadow: 0 10px 26px rgba(132, 176, 130, 0.4);
	transform: translateY(-1px);
}

.jhs-cc-btn-reject {
	background-color: transparent;
	color: var(--cc-text-color, #333333);
	border: 1px solid rgba(51, 51, 51, 0.15);
}

.jhs-cc-btn-reject:hover {
	background-color: rgba(51, 51, 51, 0.06);
}

.jhs-cc-btn-preferences {
	background-color: transparent;
	color: var(--cc-button-color, #84B082);
	border: 1px solid rgba(132, 176, 130, 0.45);
}

.jhs-cc-btn-preferences:hover {
	background-color: rgba(132, 176, 130, 0.15);
}

.jhs-cc-btn-primary {
	background-color: var(--cc-button-color, #84B082);
	color: var(--cc-button-text-color, #ffffff);
	box-shadow: 0 6px 18px rgba(132, 176, 130, 0.28);
}

.jhs-cc-btn-primary:hover {
	box-shadow: 0 8px 22px rgba(132, 176, 130, 0.34);
}

.jhs-cc-btn-tertiary {
	background: transparent;
	border: none;
	color: rgba(51, 51, 51, 0.75);
	text-decoration: underline;
	padding: 8px 14px;
}

.jhs-cc-btn-tertiary:hover {
	opacity: 0.85;
}

.jhs-cc-preferences-open .jhs-cc-footer {
	display: none;
}

/* Inline Preferences */
.jhs-cc-inline-preferences {
	background: rgba(255, 255, 255, 0.58);
	border: 1px solid rgba(255, 255, 255, 0.4);
	border-radius: 16px;
	padding: 18px 20px;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.3);
	display: grid;
	gap: 18px;
}

.jhs-cc-inline-preferences[hidden] {
	display: none !important;
}

.jhs-cc-inline-preferences.is-open {
	animation: fadeIn 0.25s ease-out;
}

.jhs-cc-inline-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
}

.jhs-cc-inline-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--cc-text-color, #333333);
}

.jhs-cc-inline-close {
	background: none;
	border: none;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
	color: rgba(51, 51, 51, 0.7);
	padding: 4px;
	opacity: 0.65;
	transition: opacity 0.2s ease;
}

.jhs-cc-inline-close:hover {
	opacity: 1;
}

.jhs-cc-inline-description {
	margin: 0;
	color: rgba(51, 51, 51, 0.75);
}

.jhs-cc-inline-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: flex-end;
}

.jhs-cc-preferences-open .jhs-cc-inline-actions .jhs-cc-btn {
	min-width: 160px;
}

.jhs-cc-categories-inline {
	display: grid;
	gap: 12px;
}

/* Toggle styling */
.jhs-cc-category {
	padding: 14px 0;
	border-bottom: 1px solid rgba(255, 255, 255, 0.4);
}

.jhs-cc-category:last-child {
	border-bottom: none;
}

.jhs-cc-category.is-locked {
	opacity: 0.75;
}

.jhs-cc-toggle {
	display: flex;
	align-items: center;
	gap: 16px;
	cursor: pointer;
	position: relative;
}

.jhs-cc-toggle input[type="checkbox"] {
	position: absolute;
	inset: 0;
	opacity: 0;
	cursor: pointer;
}

.jhs-cc-toggle-track {
	width: 48px;
	height: 28px;
	background: rgba(132, 176, 130, 0.25);
	border-radius: 999px;
	position: relative;
	transition: background 0.2s ease, border-color 0.2s ease;
	flex-shrink: 0;
	border: 1px solid rgba(132, 176, 130, 0.4);
}

.jhs-cc-toggle-thumb {
	width: 24px;
	height: 24px;
	background: #ffffff;
	border-radius: 50%;
	position: absolute;
	top: 50%;
	left: 4px;
	transform: translate(0, -50%);
	box-shadow: 0 3px 10px rgba(15, 23, 42, 0.22);
	transition: transform 0.2s ease, background 0.2s ease;
}

.jhs-cc-toggle input[type="checkbox"]:checked + .jhs-cc-toggle-track {
	background: var(--cc-button-color, #84B082);
	border-color: var(--cc-button-color, #84B082);
}

.jhs-cc-toggle input[type="checkbox"]:checked + .jhs-cc-toggle-track .jhs-cc-toggle-thumb {
	transform: translate(20px, -50%);
	background: var(--cc-button-text-color, #ffffff);
}

.jhs-cc-toggle input[type="checkbox"]:disabled + .jhs-cc-toggle-track {
	background: rgba(132, 176, 130, 0.18);
	border-color: rgba(132, 176, 130, 0.28);
}

.jhs-cc-toggle input[type="checkbox"]:focus-visible + .jhs-cc-toggle-track {
	box-shadow: 0 0 0 3px rgba(132, 176, 130, 0.35);
}

.jhs-cc-category-content {
	display: grid;
	gap: 4px;
}

.jhs-cc-category-content strong {
	display: block;
	font-size: 15px;
	color: var(--cc-text-color, #333333);
}

.jhs-cc-category-content .description {
	margin: 0;
	font-size: 13px;
	color: rgba(51, 51, 51, 0.7);
}

.jhs-cc-category.is-locked .jhs-cc-category-content strong::after {
	content: '• Altijd actief';
	margin-left: 6px;
	font-size: 11px;
	color: var(--cc-button-color, #84B082);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* Responsive */
@media (max-width: 1024px) {
	.jhs-cc-position-bottom,
	.jhs-cc-position-top {
		left: 16px;
		right: 16px;
	}
}

@media (max-width: 768px) {
	.jhs-cookie-consent-banner {
		left: 10px;
		right: 10px;
		max-height: 90vh;
		overflow-y: auto;
	}

	.jhs-cc-position-bottom {
		bottom: 10px;
		top: auto;
	}

	.jhs-cc-position-top {
		top: 10px;
		bottom: auto;
	}

	.jhs-cc-position-left,
	.jhs-cc-position-right {
		top: auto;
		bottom: 10px;
		left: 10px;
		right: 10px;
		transform: none;
		max-width: none;
	}

	.jhs-cc-content {
		padding: 20px;
	}

	.jhs-cc-footer {
		flex-direction: column;
		align-items: stretch;
	}

	.jhs-cc-btn {
		width: 100%;
	}

	.jhs-cc-inline-actions {
		justify-content: stretch;
	}

	.jhs-cc-inline-actions .jhs-cc-btn {
		flex: 1;
	}
}

/* Accessibility */
.jhs-cc-btn:focus-visible,
.jhs-cc-close:focus-visible,
.jhs-cc-inline-close:focus-visible {
	outline: 2px solid var(--cc-button-color, #84B082);
	outline-offset: 3px;
}
