:root {
	--tree-accent: var(--bde-palette-color-2-37274dae-70ba-4102-9104-267e2fb888c4);
	--tree-accent-dark: var(--bde-palette-color-1-5dfd57e1-64b5-429c-8968-707c8480b60b);

	--tree-bg-light: #fff;
	--tree-bg-muted: #f7f9fa;
	--tree-border: #d9dee3;
	--tree-border-muted: #e3e6ea;
	--tree-shadow: rgba(0, 0, 0, 0.07);
	--tree-shadow-hover: rgba(0, 0, 0, 0.1);
}

/* =========================================================
   CONTAINER LAYOUT
========================================================= */
.tree-search-wrapper {
}

#tree-search-loading {
	position: absolute;
	inset: 0;
	z-index: 10;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.75);
	border-radius: 12px;
	font-size: 16px;
	font-weight: 600;
	color: #444;
	gap: 10px;
	pointer-events: none;
}

#tree-search-loading::before {
	content: "";
	width: 18px;
	height: 18px;
	border-radius: 50%;
	border: 2px solid #d0d4d8;
	border-top-color: var(--tree-accent-dark);
	animation: spin 0.9s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.tree-search-container {
	display: grid;
	grid-template-columns: 1fr 1fr 2fr;
	gap: 16px;
}

/* =========================================================
   SEARCH BOX
========================================================= */

#tree-search-box {
	width: 100%;
	margin: 12px 0 18px;
	padding: 14px 18px;
	border: 2px solid #cfd5db;
	border-radius: 10px;
	background: var(--tree-bg-light);
	font-size: 16px;
	transition: all 0.2s ease;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}

#tree-search-box:focus {
	border-color: var(--tree-accent-dark);
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.15);
	outline: none;
}

/* =========================================================
   CATEGORY + PRODUCT DROPDOWNS
========================================================= */
.tree-line-container {
	margin: 24px 0;
	display: grid;
	gap: 12px;
	grid-template-columns: 1fr auto 1fr;
	justify-content: center;
	align-items: center;
}

.tree-line {
	width: 100%;
	height: 2px;
	background: var(--tree-border);
}

#tree-search-dropdowns {
	display: grid;
	gap: 16px;
	height: fit-content;
	padding-right: 16px;
	border-right: solid 1px var(--tree-border);
}
#tree-search-dropdowns select,
#tree-search-products {
	width: 100%;
	padding: 12px 16px;
	border: 2px solid var(--tree-border);
	border-radius: 8px;
	background: var(--tree-bg-light);
	font-size: 15px;
	padding-right: 40px;
	transition: border-color 0.2s ease;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06);
}

#tree-search-dropdowns select:focus,
#tree-search-products:focus {
	border-color: var(--tree-accent-dark);
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.12);
	outline: none;
}

/* =========================================================
   PRODUCT CARD
========================================================= */
.tree-search-product-container {
	display: grid;
	grid-template-columns: 140px auto;
	gap: 18px;

	width: fit-content;
	padding: 18px;

	border-radius: 12px;
	border: 1px solid var(--tree-border-muted);
	background: var(--tree-bg-light);

	box-shadow: 0 3px 10px var(--tree-shadow);
	transition:
		box-shadow 0.2s ease,
		transform 0.15s ease;
}

.tree-search-product-container:hover {
	box-shadow: 0 6px 16px var(--tree-shadow-hover);
	transform: translateY(-2px);
}

.tree-search-product-image {
	width: 100%;
	max-height: 140px;
	object-fit: cover;
	border-radius: 8px;
	background: #f4f4f4;
}

.tree-search-product-name {
	display: block;
	font-size: 18px;
	font-weight: 600;
	margin-bottom: 6px;
}

.tree-search-product-sku {
	display: block;
	font-size: 13px;
	color: #888;
	margin-bottom: 4px;
}

.tree-search-product-desc {
	display: block;
	font-size: 14px;
	color: #555;
	margin-top: 4px;
}

.tree-search-product-price {
	font-size: 16px;
	font-weight: 500;
	color: var(--tree-accent);
	margin-top: 6px;
}

/* =========================================================
   DOCUMENTS LIST
========================================================= */

.tree-search-product-docs {
	margin-top: 14px;
	padding-top: 12px;
	border-top: 1px solid #e5e8ec;
	grid-column: span 2;
}

.doc-links-grid {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

/* Each doc link card */
.doc-link-card {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;

	background: var(--tree-bg-muted);
	border: 1px solid #e1e4e8;
	border-radius: 6px;

	color: var(--tree-accent);
	font-weight: 500;
	text-decoration: none;
	font-size: 14px;
}

.doc-link-card:hover {
	background: #eef3f7;
	border-color: #ccd4db;
}

/* Left icon */
.doc-icon {
	font-size: 16px;
}

/* Title text */
.doc-info .doc-title {
	font-weight: 600;
	color: #333;
}

@media (max-width: 950px) {
	#tree-search-dropdowns {
		border-right: none !important;
		padding-right: 0 !important;
	}
	.tree-search-container {
		grid-template-columns: 1fr;
	}
}
