/**
 * Cross Site Search Styles
 *
 * @package Cross_Site_Search
 */

/* Search Form Styles */
.css-cross-site-search-widget {
	margin: 20px 0;
	position: relative;
}

.css-search-form {
	display: flex;
	gap: 10px;
	margin-bottom: 12px;
}

.css-search-form-inline {
	flex-direction: row;
	align-items: center;
}

.css-search-form-stacked {
	flex-direction: column;
}

.css-search-form-stacked .css-search-input {
	margin-bottom: 10px;
}

.css-search-input {
	flex: 1;
	padding: 14px 17px;
	font-size: 16px;
	line-height: 1.5;
	border: 2px solid #0d4b8c;
	border-radius: 6px;
	background-color: #fff;
	transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.css-search-input:focus {
	outline: none;
	border-color: #ff8b00;
	box-shadow: 0 0 0 1px #ff8b00;
}

.css-search-button {
	padding: 12px 24px;
	font-size: 16px;
	font-weight: 600;
	color: #fff;
	background-color: #0073aa;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: background-color 0.3s ease;
}

.css-search-button:hover {
	background-color: #005a87;
}

.css-search-button:active {
	transform: translateY(1px);
}

.css-search-form-stacked .css-search-button {
	width: 100%;
}

/* Results Container */
.css-search-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	width: 100%;
	background-color: #fff;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
	z-index: 999;
	max-height: 420px;
	overflow-y: auto;
	padding: 6px 0;
	display: none;
}

.css-search-results.is-visible {
	display: block;
}

/* Loading State */
.css-search-loading,
.css-search-no-results,
.css-search-error {
	padding: 16px;
	text-align: center;
}

.css-search-no-results {
	color: #666;
}

.css-search-error {
	color: #d63638;
}

/* Results List */
.css-search-results-list {
	list-style: none;
	padding: 0;
	margin: 0;
}

.css-result-item {
	padding: 12px 20px;
	border-bottom: 1px solid #f0f0f0;
}

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

.css-result-item a {
	text-decoration: none;
	color: #0d4b8c;
	display: flex;
	flex-direction: column;
}

.css-result-item a:hover .css-result-title {
	color: #ff8b00;
}

.css-result-title {
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 2px;
}

.css-result-source {
	font-size: 13px;
	color: #666;
}

/* Responsive Design */
@media (max-width: 768px) {
	.css-search-form-inline {
		flex-direction: column;
	}

	.css-search-form-inline .css-search-input {
		margin-bottom: 10px;
	}

	.css-search-form-inline .css-search-button {
		width: 100%;
	}
}

.css-search-form-no-button .css-search-input {
	margin-right: 0;
}

