/**
 * Frontend CSS for FileBird Elementor Widget
 */

/* Widget Container */
.fbew-widget-container {
	width: 100%;
	margin: 0 auto;
}

/* Tree Container */
.fbew-tree-container {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.fbew-tree-wrapper {
	background: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	padding: 20px;
}

/* Tree Structure */
.fbew-tree {
	list-style: none;
	margin: 0;
	padding: 0;
}

.fbew-tree-node {
	margin: 0;
	padding: 0;
	list-style: none;
}

.fbew-tree-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	margin: 2px 0;
	border-radius: 4px;
	transition: background-color 0.2s ease;
	cursor: pointer;
	user-select: none;
}

.fbew-tree-item:hover {
	background-color: #f5f5f5;
}

.fbew-folder-item {
	font-weight: 500;
	color: #333;
}

.fbew-file-item {
	font-weight: 400;
	color: #666;
}

.fbew-file-item:hover {
	background-color: #f9f9f9;
}

/* Indent Placeholder */
.fbew-indent-placeholder {
	width: 20px;
	height: 20px;
	flex-shrink: 0;
}

/* Icons */
.fbew-folder-icon,
.fbew-file-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	color: #0073aa;
}

.fbew-folder-icon {
	width: 20px;
	height: 20px;
}

.fbew-file-icon {
	width: 16px;
	height: 16px;
	color: #d63638;
}

/* Folder and File Names */
.fbew-folder-name {
	flex: 1;
	font-size: 15px;
}

.fbew-file-name {
	flex: 1;
	font-size: 14px;
	color: #333;
	text-decoration: none;
	transition: color 0.2s ease;
}

.fbew-file-name:hover {
	color: #0073aa;
	text-decoration: underline;
}

/* File Count */
.fbew-file-count {
	font-size: 12px;
	color: #999;
	margin-left: 8px;
}

/* Tree Children */
.fbew-tree-children {
	list-style: none;
	margin: 0;
	padding-left: 24px;
	border-left: 1px solid #e8e8e8;
	margin-left: 10px;
	display: block;
}

.fbew-tree-node[data-level="0"] > .fbew-tree-item {
	font-weight: 600;
	font-size: 16px;
}

.fbew-tree-node[data-level="1"] > .fbew-tree-item {
	font-weight: 500;
	font-size: 15px;
}

.fbew-tree-node[data-level="2"] > .fbew-tree-item {
	font-weight: 400;
	font-size: 14px;
}

/* Empty State */
.fbew-empty-state {
	text-align: center;
	padding: 40px 20px;
	color: #666;
}

.fbew-empty-state p {
	margin: 0;
	font-size: 16px;
}

/* Responsive */
@media (max-width: 768px) {
	.fbew-tree-wrapper {
		padding: 15px;
	}

	.fbew-tree-children {
		padding-left: 16px;
		margin-left: 8px;
	}

	.fbew-folder-name,
	.fbew-file-name {
		font-size: 14px;
	}

	.fbew-tree-node[data-level="0"] > .fbew-tree-item {
		font-size: 15px;
	}
}
