.obi-search {
	--obi-accent: #0b57d0;
	--obi-border: #d0d5dd;
	--obi-text: #101828;
	--obi-muted: #667085;
	--obi-surface: #fff;
	--obi-row: #f8fafc;
	position: relative;
	width: 100%;
}

.obi-search .wp-block-search__inside-wrapper {
	display: flex;
	gap: 8px;
	width: 100%;
}

.obi-search .obi-search__input {
	background: var(--obi-surface);
	border: 1px solid var(--obi-border);
	border-radius: 8px;
	color: var(--obi-text);
	flex: 1 1 auto;
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	min-width: 0;
	padding: 12px 14px;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.obi-search .obi-search__input:focus {
	border-color: var(--obi-accent);
	box-shadow: 0 0 0 3px rgba(11, 87, 208, .18);
	outline: none;
}

.obi-search .obi-search__button {
	background: var(--obi-accent);
	border: 0;
	border-radius: 8px;
	color: #fff;
	cursor: pointer;
	font: inherit;
	font-weight: 700;
	padding: 12px 20px;
	white-space: nowrap;
}

.obi-search .obi-search__button:hover {
	filter: brightness(.92);
}

.obi-results[hidden],
.obi-results [hidden] {
	display: none !important;
}

.obi-results--inline {
	margin-top: 18px;
}

.obi-results--popup {
	display: grid;
	inset: 0;
	place-items: center;
	position: fixed;
	z-index: 999999;
}

.obi-results__backdrop {
	background: rgba(15, 23, 42, .7);
	inset: 0;
	position: absolute;
}

.obi-results__surface {
	background: var(--obi-surface);
	border: 1px solid var(--obi-border);
	border-radius: 12px;
	box-shadow: 0 18px 60px rgba(16, 24, 40, .16);
	color: var(--obi-text);
	overflow: hidden;
	position: relative;
	width: 100%;
}

.obi-results--popup .obi-results__surface {
	max-height: min(82vh, 760px);
	max-width: min(1100px, calc(100vw - 32px));
	overflow: auto;
}

.obi-results__header {
	align-items: flex-start;
	border-bottom: 1px solid var(--obi-border);
	display: flex;
	gap: 20px;
	justify-content: space-between;
	padding: 18px 20px;
}

.obi-results__header h2 {
	color: var(--obi-text);
	font-size: 20px;
	line-height: 1.25;
	margin: 0;
}

.obi-results__header p {
	color: var(--obi-muted);
	font-size: 14px;
	margin: 5px 0 0;
}

.obi-results__close {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 999px;
	color: var(--obi-muted);
	cursor: pointer;
	display: flex;
	font-size: 30px;
	height: 36px;
	justify-content: center;
	line-height: 1;
	padding: 0;
	width: 36px;
}

.obi-results__close:hover,
.obi-results__close:focus-visible {
	background: #eef2f6;
	color: var(--obi-text);
}

.obi-results__table-wrap {
	overflow-x: auto;
}

.obi-results__table {
	border-collapse: collapse;
	font-size: 15px;
	margin: 0;
	width: 100%;
}

.obi-results__table th,
.obi-results__table td {
	border: 0;
	border-bottom: 1px solid #eaecf0;
	padding: 14px 20px;
	text-align: left;
	vertical-align: middle;
}

.obi-results__table th {
	background: var(--obi-row);
	color: #344054;
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
}

.obi-results__table tbody tr:last-child td {
	border-bottom: 0;
}

.obi-results__table tbody tr:hover {
	background: #f9fbff;
}

.obi-results__table a {
	color: var(--obi-accent);
	font-weight: 700;
	text-decoration: none;
}

.obi-results__table a:hover {
	text-decoration: underline;
}

.obi-results__price {
	font-size: 16px;
	font-weight: 800;
	white-space: nowrap;
}

.obi-results__loading,
.obi-results__empty {
	color: var(--obi-muted);
	padding: 30px 20px;
	text-align: center;
}

.obi-results__loading span {
	animation: obi-spin .7s linear infinite;
	border: 3px solid #dbe6f8;
	border-radius: 999px;
	border-top-color: var(--obi-accent);
	display: inline-block;
	height: 28px;
	width: 28px;
}

.obi-modal-open {
	overflow: hidden;
}

@keyframes obi-spin {
	to { transform: rotate(360deg); }
}

@media (max-width: 700px) {
	.obi-search .wp-block-search__inside-wrapper {
		align-items: stretch;
		flex-direction: column;
	}

	.obi-search .obi-search__button {
		width: 100%;
	}

	.obi-results__table thead {
		display: none;
	}

	.obi-results__table,
	.obi-results__table tbody,
	.obi-results__table tr,
	.obi-results__table td {
		display: block;
		width: 100%;
	}

	.obi-results__table tr {
		border-bottom: 8px solid var(--obi-row);
		padding: 8px 0;
	}

	.obi-results__table td {
		border: 0;
		box-sizing: border-box;
		padding: 7px 16px 7px 43%;
		position: relative;
	}

	.obi-results__table td::before {
		color: var(--obi-muted);
		content: attr(data-label);
		font-size: 12px;
		font-weight: 700;
		left: 16px;
		position: absolute;
		text-transform: uppercase;
		top: 9px;
		width: calc(43% - 24px);
	}
}

@media (prefers-reduced-motion: reduce) {
	.obi-results__loading span {
		animation-duration: 1.5s;
	}
}

