/* Frontend Styles */

.dis-widget-wrapper {
	padding: 20px;
	background: #fff;
}

.dis-widget-title {
	margin: 0 0 20px 0;
	font-size: 24px;
	font-weight: 600;
	color: #333;
}

.dis-frontend-wrapper {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* Search Container */
.dis-search-container {
	max-width: 600px;
}

.dis-search-box {
	position: relative;
	margin-bottom: 20px;
}

.dis-search-input {
	width: 100%;
	padding: 12px 40px 12px 16px;
	border: 2px solid #ddd;
	border-radius: 6px;
	font-size: 16px;
	transition: all 0.3s;
	box-sizing: border-box;
}

.dis-search-input:focus {
	outline: none;
	border-color: #0073aa;
	box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.1);
}

.dis-search-clear {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	font-size: 18px;
	color: #999;
	cursor: pointer;
	padding: 4px 8px;
	transition: color 0.3s;
}

.dis-search-clear:hover {
	color: #333;
}

/* Loading and Messages */
.dis-loading {
	color: #666;
	font-size: 14px;
	padding: 10px 0;
}

.dis-no-results {
	color: #999;
	font-size: 14px;
	padding: 15px;
	background: #f5f5f5;
	border-radius: 4px;
	text-align: center;
}

/* Results Container */
.dis-results-container {
	margin-bottom: 20px;
}

.dis-results-count {
	font-size: 14px;
	color: #666;
	margin-bottom: 12px;
	font-weight: 500;
}

.dis-results-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
	max-height: 400px;
	overflow-y: auto;
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #fff;
}

/* Result Item */
.dis-result-item {
	padding: 12px 16px;
	border-bottom: 1px solid #eee;
	cursor: pointer;
	transition: all 0.2s;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 15px;
}

.dis-result-item:last-child {
	border-bottom: none;
}

.dis-result-item:hover {
	background-color: #f9f9f9;
}

.dis-result-item.selected {
	background-color: #e8f4f8;
	border-left: 4px solid #0073aa;
	padding-left: 12px;
}

.dis-result-info {
	flex: 1;
	min-width: 0;
}

.dis-result-brand {
	font-weight: 600;
	color: #333;
	font-size: 14px;
	margin-bottom: 4px;
}

.dis-result-details {
	font-size: 12px;
	color: #999;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.dis-result-screw {
	display: flex;
	align-items: center;
	gap: 8px;
	white-space: nowrap;
}

.dis-screw-label {
	font-size: 12px;
	color: #666;
	font-weight: 500;
}

.dis-screw-value {
	font-size: 14px;
	font-weight: 700;
	color: #0073aa;
	background: #f0f7ff;
	padding: 4px 8px;
	border-radius: 3px;
}

/* Result Box */
.dis-result-box {
	background: linear-gradient(135deg, #f5f7fa 0%, #f9fafb 100%);
	border: 2px solid #0073aa;
	border-radius: 8px;
	padding: 20px;
	margin-top: 20px;
}

.dis-result-box h3 {
	margin: 0 0 15px 0;
	font-size: 16px;
	color: #333;
	font-weight: 600;
}

.dis-result-detail {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 15px;
}

.dis-detail-row {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.dis-detail-label {
	font-size: 12px;
	color: #999;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.dis-detail-value {
	font-size: 16px;
	color: #333;
	font-weight: 500;
}

.dis-detail-screw .dis-detail-value {
	font-size: 18px;
	font-weight: 700;
	color: #0073aa;
}

/* Scrollbar Styling */
.dis-results-list::-webkit-scrollbar {
	width: 6px;
}

.dis-results-list::-webkit-scrollbar-track {
	background: #f1f1f1;
	border-radius: 3px;
}

.dis-results-list::-webkit-scrollbar-thumb {
	background: #ccc;
	border-radius: 3px;
}

.dis-results-list::-webkit-scrollbar-thumb:hover {
	background: #999;
}

/* Responsive */
@media (max-width: 600px) {
	.dis-widget-wrapper {
		padding: 15px;
	}

	.dis-search-input {
		font-size: 16px;
		padding: 10px 36px 10px 12px;
	}

	.dis-result-item {
		flex-direction: column;
		align-items: flex-start;
	}

	.dis-result-screw {
		width: 100%;
		justify-content: space-between;
	}

	.dis-result-detail {
		grid-template-columns: 1fr;
	}

	.dis-detail-row {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
	}
}
