/**
 * MAP AI Search - live dropdown styles (matched to the MAP theme).
 */

.mapais-search-box {
	position: relative;
}

.mapais-dropdown {
	position: absolute;
	top: 100%;
	left: 0;
	right: 0;
	z-index: 1050;
	margin-top: 6px;
	background: #fff;
	border-radius: 7px;
	box-shadow: 0 12px 34px rgba(0, 0, 0, 0.18);
	overflow: hidden;
	text-align: left;
	font-family: 'Rubik', sans-serif;
}

/* Header pill: align to the search form's own margins */
.header-middle > .mapais-dropdown {
	left: 14px;
	right: 14px;
}

/* Inside the mobile search modal we render inline under the input */
.mapais-dropdown-inline {
	position: static;
	margin: 0 auto 6px;
	width: 90%;
	max-width: 500px;
	box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
	border: 1px solid #e6e6e6;
}

.mapais-items {
	max-height: 60vh;
	overflow-y: auto;
}

.mapais-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-bottom: 1px solid #f0f0f0;
	text-decoration: none;
	color: #1a2428;
	transition: background-color 0.12s ease;
}

.mapais-item:hover,
.mapais-item.active,
.mapais-item:focus {
	background: #fff3f5;
	text-decoration: none;
	color: #1a2428;
	outline: none;
}

.mapais-item:last-child {
	border-bottom: 0;
}

.mapais-item-img {
	width: 52px;
	height: 52px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
	background: #f4f4f4;
}

.mapais-item-body {
	flex: 1;
	min-width: 0;
}

.mapais-item-title {
	font-weight: 500;
	font-size: 15px;
	color: #1a2428;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	line-height: 1.3;
}

.mapais-item-price {
	font-size: 14px;
	color: #db0632;
	font-weight: 500;
	margin-top: 2px;
	line-height: 1.3;
}

.mapais-item-price del {
	color: #999;
	font-weight: 400;
	margin-right: 4px;
}

.mapais-item-price ins {
	text-decoration: none;
}

.mapais-loading,
.mapais-empty,
.mapais-error {
	padding: 14px;
	text-align: center;
	color: #666;
	font-size: 14px;
}

.mapais-error {
	color: #d63638;
}

.mapais-spinner {
	display: inline-block;
	width: 14px;
	height: 14px;
	border: 2px solid #ddd;
	border-top-color: #db0632;
	border-radius: 50%;
	vertical-align: -2px;
	margin-right: 4px;
	animation: mapais-spin 0.7s linear infinite;
}

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

.mapais-view-all {
	display: block;
	padding: 11px 14px;
	text-align: center;
	background: #db0632;
	color: #fff !important;
	text-decoration: none;
	font-weight: 500;
	font-size: 14px;
}

.mapais-view-all:hover {
	background: #b8002a;
	color: #fff;
	text-decoration: none;
}

@media (max-width: 1199px) {
	.mapais-dropdown:not(.mapais-dropdown-inline) {
		left: 0;
		right: 0;
	}
}
