.wp-block-orphic-ui-search-bar {
	margin: 1.5rem 0;
	border: none;
	position: relative;

	.search-container {
		position: relative;
		width: 100%;
		align-items: center;
	}

	.search-preview {
		position: relative;
		display: flex;
		align-items: stretch;

		gap: 10px;
		width: 100%;
	}

	.search-preview-input-wrapper {
		display: flex;
		width: 100%;
		position: relative;
		background-color: var(--search-input-bg);
		border: var(--search-input-border-width) var(--search-input-border-style)
			var(--search-input-border-color);
		border-radius: var(--search-input-border-radius);
		padding: var(--search-input-padding);
		box-shadow: var(--search-input-box-shadow);
		gap: 10px;
		align-items: center;

		&.integrated {
			padding-right: 0;
		}
	}

	.search-input {
		flex: 1;
		min-width: 0;
		font-family: inherit;
		background: transparent;
		border: none;
		outline: none;
		box-shadow: none;
		-webkit-appearance: none;
		color: var(--search-input-text-color);
		width: 100%;
		font-size: 14px;
		padding: 12px 16px;

		&::placeholder {
			color: var(--search-input-placeholder-color);
		}

		&:focus,
		&:focus-visible,
		&:active {
			outline: none;
			border: none;
			box-shadow: none;
			-webkit-appearance: none;
		}
	}

	.search-button {
		display: flex;
		align-items: center;
		justify-content: center;
		white-space: nowrap;
		padding: var(--search-button-padding-top) var(--search-button-padding-right)
			var(--search-button-padding-bottom) var(--search-button-padding-left);
		border: none;
		cursor: pointer;
		font-family: "Jakarta", sans-serif;
		font-weight: 600;
		transition: all 0.2s ease;
		background-color: var(--search-button-bg);
		color: var(--search-button-text-color);
		border-radius: var(--search-button-border-radius-top-left)
			var(--search-button-border-radius-top-right)
			var(--search-button-border-radius-bottom-right)
			var(--search-button-border-radius-bottom-left);

		&:hover {
			background-color: var(--search-button-hover-bg);
		}
	}

	.search-preview-input-wrapper.integrated .search-button {
		position: absolute;
		right: 0;
		top: 0;
		bottom: 0;
		height: 100%;
	}

	// Dropdown styles
	.search-results-dropdown {
		position: absolute;
		top: 100%;
		left: 0;
		right: 0;
		background-color: var(--search-dropdown-bg, #ffffff);
		padding: var(--search-dropdown-padding, 8px);
		margin-top: 5px;
		border: var(--search-dropdown-border-width, 1px)
			var(--search-dropdown-border-style, solid)
			var(--search-dropdown-border-color, #ebecf0);
		border-radius: var(--search-dropdown-border-radius, 6px);
		box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
		z-index: 1000;
		width: var(--search-dropdown-width, calc(100% - 150px));

		.search-result-item {
			padding: var(--search-dropdown-item-padding, 10px 15px);
			background-color: transparent;
			color: var(--search-dropdown-item-text-color, #172b4d);
			cursor: pointer;
			transition: all 0.2s ease;
			border-bottom: 1px solid #eee;

			&:last-child {
				border-bottom: none;
			}

			.result-title {
				font-weight: 600;
				font-size: 14px;
				margin-bottom: 4px;
			}

			.result-type {
				font-size: 12px;
				color: #6b778c;
				margin-bottom: 4px;
				transition: color 0.2s ease;
			}

			.result-excerpt {
				font-size: 13px;
				color: #5e6c84;
				line-height: 1.4;
				margin-bottom: 4px;
				transition: color 0.2s ease;
			}

			&:hover {
				background-color: var(--search-dropdown-item-hover-bg);
				color: var(--search-dropdown-item-hover-text-color);

				.result-title {
					color: var(--search-dropdown-item-hover-text-color);
				}
			}
		}

		.no-results {
			padding: var(--search-dropdown-item-padding, 10px 15px);
			color: #6b778c;
			text-align: center;
			font-size: 14px;
		}

		.loading-search {
			padding: var(--search-dropdown-item-padding, 10px 15px);
			color: #6b778c;
			text-align: center;
			font-size: 14px;
			display: flex;
			justify-content: center;
			align-items: center;

			.spinner {
				width: 20px;
				height: 20px;
				border: 2px solid #f3f3f3;
				border-top: 2px solid #6b778c;
				border-radius: 50%;
				animation: spin 1s linear infinite;
			}

			@keyframes spin {
				0% {
					transform: rotate(0deg);
				}
				100% {
					transform: rotate(360deg);
				}
			}
		}

		.dots {
			display: none;
		}
	}

	// Styles responsifs
	@media (max-width: 768px) {
		flex-direction: column;
		gap: 0.5rem;

		.search-preview-input-wrapper {
			width: 100%;
		}

		.search-preview-external-button {
			width: 100%;
			margin-left: 0;
			margin-top: 10px;
		}

		.search-results-dropdown {
			width: 100%;
		}
	}
}
