.swas-widget {
	position: relative;
	width: 100%;
	max-width: 100%;
	color: #1f2937;
	font-size: 14px;
	line-height: 1.4;
}

.swas-widget *,
.swas-widget *::before,
.swas-widget *::after {
	box-sizing: border-box;
}

.swas-admin-editor-notice {
	margin-bottom: 8px;
	border-inline-start: 4px solid #d97706;
	background: #fffbeb;
	color: #92400e;
	padding: 9px 12px;
	font-size: 13px;
}

.swas-search-shell {
	position: relative;
	width: 100%;
}

.swas-search-row {
	display: flex;
	align-items: stretch;
	gap: 8px;
	width: 100%;
}

.swas-search-field {
	display: flex;
	align-items: center;
	flex: 1 1 auto;
	min-width: 0;
	min-height: 44px;
	padding: 0 12px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #ffffff;
	transition: border-color 160ms ease, box-shadow 160ms ease;
}

.swas-search-field:focus-within {
	border-color: #2563eb;
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.swas-search-input {
	width: 100%;
	min-width: 0;
	border: 0;
	outline: 0;
	background: transparent;
	color: inherit;
	font: inherit;
}

.swas-search-input::-webkit-search-cancel-button {
	appearance: none;
}

.swas-category-select {
	min-width: 132px;
	max-width: 220px;
	border: 1px solid #d1d5db;
	border-radius: 6px;
	background: #ffffff;
	color: #1f2937;
	padding: 0 10px;
	font: inherit;
}

.swas-icon,
.swas-icon-button,
.swas-search-submit,
.swas-overlay-close {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.swas-icon {
	flex: 0 0 auto;
	margin-inline-end: 8px;
	color: #64748b;
}

.swas-icon svg,
.swas-icon-button svg,
.swas-overlay-close svg {
	width: 18px;
	height: 18px;
}

.swas-icon-button,
.swas-overlay-close {
	appearance: none;
	border: 0;
	background: transparent;
	color: #64748b;
	cursor: pointer;
	padding: 6px;
}

.swas-icon-button:hover,
.swas-overlay-close:hover {
	color: #111827;
}

.swas-search-submit {
	flex: 0 0 auto;
	min-height: 44px;
	border: 0;
	border-radius: 6px;
	background: #111827;
	color: #ffffff;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	padding: 0 18px;
	white-space: nowrap;
}

.swas-search-submit:hover {
	background: #374151;
	color: #ffffff;
}

.swas-results-panel {
	position: absolute;
	inset-inline-start: 0;
	top: calc(100% + 8px);
	z-index: 99999;
	width: 100%;
	max-height: 420px;
	overflow: auto;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #ffffff;
	box-shadow: 0 16px 45px rgba(15, 23, 42, 0.16);
	padding: 8px;
}

.swas-results-status {
	color: #64748b;
	font-size: 13px;
	padding: 6px 8px;
}

.swas-results-list {
	display: grid;
	gap: 4px;
}

.swas-result-item {
	position: relative;
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px;
	border-radius: 6px;
	transition: background 140ms ease;
}

.swas-result-item:hover {
	background: #f8fafc;
}

.swas-result-image-link {
	display: block;
	flex: 0 0 auto;
}

.swas-result-image {
	display: block;
	width: 58px;
	height: 58px;
	border-radius: 6px;
	object-fit: cover;
	background: #f3f4f6;
}

.swas-result-content {
	display: grid;
	gap: 4px;
	min-width: 0;
	flex: 1 1 auto;
}

.swas-result-title {
	color: #111827;
	font-weight: 650;
	text-decoration: none;
	overflow-wrap: anywhere;
}

.swas-result-title:hover {
	color: #2563eb;
}

.swas-result-price {
	color: #111827;
	font-weight: 600;
}

.swas-result-price del {
	color: #94a3b8;
	font-weight: 400;
}

.swas-result-price ins {
	color: #b91c1c;
	text-decoration: none;
}

.swas-result-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px 10px;
	color: #64748b;
	font-size: 12px;
}

.swas-result-actions {
	margin-top: 4px;
}

.swas-action-button {
	display: inline-flex;
	align-items: center;
	min-height: 30px;
	border-radius: 6px;
	background: #0f766e;
	color: #ffffff;
	font-size: 12px;
	font-weight: 700;
	line-height: 1;
	padding: 0 10px;
	text-decoration: none;
}

.swas-action-button:hover {
	background: #115e59;
	color: #ffffff;
}

.swas-view-button {
	background: #334155;
}

.swas-view-button:hover {
	background: #1e293b;
}

.swas-sale-badge {
	position: absolute;
	top: 8px;
	inset-inline-end: 8px;
	border-radius: 999px;
	background: #b91c1c;
	color: #ffffff;
	font-size: 11px;
	font-weight: 700;
	line-height: 1;
	padding: 5px 7px;
}

.swas-image-panel {
	display: grid;
	gap: 10px;
	margin-top: 10px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #f8fafc;
	padding: 10px;
}

.swas-image-actions {
	display: flex;
	align-items: center;
	gap: 8px;
}

.swas-image-upload,
.swas-image-analyze {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 34px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	background: #ffffff;
	color: #111827;
	cursor: pointer;
	font: inherit;
	font-weight: 600;
	padding: 0 12px;
}

.swas-image-upload input {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
}

.swas-image-preview {
	width: 86px;
	height: 86px;
	border-radius: 8px;
	object-fit: cover;
}

.swas-fallback-keywords {
	width: 100%;
	min-height: 38px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	padding: 0 10px;
}

.swas-image-message {
	min-height: 18px;
	color: #64748b;
	font-size: 13px;
}

.swas-search-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-top: 8px;
}

.swas-search-chip {
	border: 1px solid #cbd5e1;
	border-radius: 999px;
	background: #ffffff;
	color: #334155;
	cursor: pointer;
	font: inherit;
	font-size: 12px;
	padding: 5px 10px;
}

.swas-search-chip:hover {
	border-color: #64748b;
	color: #111827;
}

.swas-screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	border: 0;
}

.swas-mobile-overlay {
	position: fixed;
	inset: 0;
	z-index: 100000;
	background: #ffffff;
	overflow: auto;
}

.swas-mobile-overlay-inner {
	position: relative;
	min-height: 100%;
	padding: 22px;
}

.swas-mobile-overlay .swas-results-panel {
	position: static;
	width: 100%;
	max-height: none;
	margin-top: 16px;
	border: 0;
	box-shadow: none;
	padding: 0;
}

.swas-mobile-overlay .swas-search-row {
	align-items: stretch;
}

.swas-overlay-close {
	margin-inline-start: auto;
	margin-bottom: 14px;
	color: #111827;
}

.swas-overlay-lock {
	overflow: hidden;
}

[dir="rtl"] .swas-icon {
	margin-inline-end: 0;
	margin-inline-start: 8px;
}

@media (max-width: 767px) {
	.swas-search-row {
		gap: 6px;
	}

	.swas-category-select {
		max-width: 42%;
		min-width: 112px;
	}

	.swas-search-submit {
		padding: 0 12px;
	}

	.swas-widget .swas-search-surface-inline .swas-results-panel {
		display: none;
	}

	.swas-result-item {
		align-items: flex-start;
	}
}
