/**
 * VDK Learning Objectives - Hierarchical Field Styles
 *
 * Frontend styles for the hierarchical selector field
 * and the cascade taxonomy selector on the add-listing form.
 *
 * @package VDK_Learning_Objectives
 * @since 2.0.0
 */

/* =========================================================================
   Cascade taxonomy selector — hide all VDK level fields by default.
   MyListing renders each field as .fieldset-{taxonomy}.
   The JS shows them progressively as the user makes selections.
   ========================================================================= */

.fieldset-vo_onderbouw_leergebied,
.fieldset-vo_onderbouw_kerndoel,
.fieldset-vo_onderbouw_subdoel,
.fieldset-vo_bovenbouw_leergebied,
.fieldset-vo_bovenbouw_kerndoel,
.fieldset-vo_bovenbouw_subdoel,
.fieldset-bo_leergebied,
.fieldset-bo_kerndoel,
.fieldset-bo_subdoel,
.fieldset-so_leergebied,
.fieldset-so_kerndoel,
.fieldset-so_subdoel {
    display: none;
}

/* Main container */
.vdk-lo-hierarchical-field {
	margin: 20px 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Selected items section */
.vdk-lo-selected-items {
	margin-bottom: 20px;
}

.vdk-lo-selected-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-bottom: 15px;
}

.vdk-lo-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 12px;
	background: #0073aa;
	color: #fff;
	border-radius: 4px;
	font-size: 14px;
	line-height: 1.4;
}

.vdk-lo-remove-badge {
	background: none;
	border: none;
	color: #fff;
	font-size: 18px;
	line-height: 1;
	cursor: pointer;
	padding: 0;
	margin: 0;
	width: 20px;
	height: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: background-color 0.2s ease;
}

.vdk-lo-remove-badge:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.vdk-lo-no-selections {
	color: #666;
	font-style: italic;
	margin: 0;
}

/* Levels */
.vdk-lo-level {
	margin-bottom: 20px;
}

.vdk-lo-level h4 {
	margin: 0 0 10px 0;
	font-size: 16px;
	font-weight: 600;
	color: #333;
}

/* Checkbox lists */
.vdk-lo-checkbox-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.vdk-lo-item {
	position: relative;
}

.vdk-lo-item label {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	padding: 8px;
	border-radius: 4px;
	transition: background-color 0.2s ease;
}

.vdk-lo-item label:hover {
	background-color: #f5f5f5;
}

.vdk-lo-checkbox {
	margin: 0;
	cursor: pointer;
}

.vdk-lo-term-name {
	font-size: 14px;
	color: #333;
}

/* Children containers */
.vdk-lo-children {
	margin-left: 30px;
	margin-top: 8px;
	padding-left: 15px;
	border-left: 2px solid #e0e0e0;
	display: none; /* Hidden by default, shown via JS */
}

/* Level-specific styles */
.vdk-lo-level-1 {
	/* Leergebieden */
}

.vdk-lo-level-2 {
	/* Kerndoelen */
}

.vdk-lo-level-2 .vdk-lo-term-name {
	font-size: 13px;
}

.vdk-lo-level-3 {
	/* Subdoelen */
}

.vdk-lo-level-3 .vdk-lo-term-name {
	font-size: 13px;
	color: #555;
}

/* Loading state */
.vdk-lo-loading {
	padding: 10px;
	text-align: center;
	color: #666;
	font-style: italic;
	animation: vdk-lo-pulse 1.5s ease-in-out infinite;
}

@keyframes vdk-lo-pulse {
	0%, 100% { opacity: 1; }
	50% { opacity: 0.5; }
}

/* Error state */
.vdk-lo-error {
	padding: 10px;
	color: #d63638;
	font-size: 13px;
}

/* No items state */
.vdk-lo-no-items {
	padding: 10px;
	color: #666;
	font-size: 13px;
	font-style: italic;
}

/* Hidden inputs */
input.vdk-lo-hidden-leergebieden,
input.vdk-lo-hidden-kerndoelen,
input.vdk-lo-hidden-subdoelen {
	display: none;
}

/* Responsive */
@media (max-width: 768px) {
	.vdk-lo-badge {
		font-size: 12px;
		padding: 5px 10px;
	}

	.vdk-lo-children {
		margin-left: 15px;
		padding-left: 10px;
	}

	.vdk-lo-term-name {
		font-size: 13px;
	}

	.vdk-lo-level-2 .vdk-lo-term-name,
	.vdk-lo-level-3 .vdk-lo-term-name {
		font-size: 12px;
	}
}
