/**
 * Autocomplete de búsqueda — header residencial y kenos.
 *
 * Reemplaza al buscador Starweb. El panel reutiliza la estructura y estilos
 * del `.stweb-sidebar-search` del theme (título uppercase + lista de links)
 * para mantener la coherencia del frontend.
 */

/* Contenedores del buscador que anclan el panel (position:relative). */
.movistar--blue .nav__search--form,
.movistar--blue .search__main,
.nat-header .nav__search--form,
.stweb-header .nav__search--form,
.search__side {
	position: relative;
}

.mrt-search-autocomplete {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 99999;
	background: #fff;
	border: 1px solid #d2d2d2;
	border-radius: 6px;
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.16);
	padding: 14px;
	max-height: 420px;
	overflow-y: auto;
	text-align: left;
}

/* Título — misma pinta que .stweb-sidebar-search__title */
.mrt-search-autocomplete .stweb-sidebar-search__title {
	font-weight: 700;
	font-size: 10px;
	color: #313235;
	letter-spacing: .1em;
	text-transform: uppercase;
	margin: 0 0 10px;
}

/* Lista — misma pinta que .stweb-sidebar-search__list */
.mrt-search-autocomplete .stweb-sidebar-search__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.mrt-search-autocomplete .mrt-sa-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 8px;
	border-bottom: 1px solid #f0f1f3;
	text-decoration: none;
	color: #313235;
	transition: background-color .15s ease;
}

.mrt-search-autocomplete .mrt-sa-item:last-child {
	border-bottom: 0;
}

.mrt-search-autocomplete .mrt-sa-item:hover,
.mrt-search-autocomplete .mrt-sa-item:focus {
	background: #f0f7fd;
}

.mrt-search-autocomplete .mrt-sa-thumb {
	flex: 0 0 48px;
	width: 48px;
	height: 48px;
	border-radius: 6px;
	overflow: hidden;
	background: #eef0f3;
	display: flex;
	align-items: center;
	justify-content: center;
}

.mrt-search-autocomplete .mrt-sa-thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.mrt-search-autocomplete .mrt-sa-thumb--empty i {
	color: #b9c0c7;
	font-size: 18px;
}

.mrt-search-autocomplete .mrt-sa-body {
	display: flex;
	flex-direction: column;
	min-width: 0;
}

.mrt-search-autocomplete .mrt-sa-type {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .05em;
	text-transform: uppercase;
	color: #019df4;
	margin-bottom: 2px;
}

.mrt-search-autocomplete .mrt-sa-title {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.25;
	color: #313235;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.mrt-search-autocomplete .mrt-sa-item:hover .mrt-sa-title {
	color: #019df4;
}

.mrt-search-autocomplete .mrt-sa-excerpt {
	font-size: 12px;
	color: #6b7280;
	line-height: 1.35;
	margin-top: 2px;
	overflow: hidden;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}

.mrt-search-autocomplete .mrt-sa-empty {
	padding: 14px 8px;
	font-size: 13px;
	color: #6b7280;
	text-align: center;
}

/* Panel del buscador mobile (drawer de search__side). */
.search__side .mrt-search-autocomplete {
	position: absolute;
	top: calc(100% + 4px);
	left: 16px;
	right: 16px;
}

/* Spinner de carga a la derecha del input (SVG animado inline, sin petición extra). */
input.mrt-sa-loading {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none'%3E%3Ccircle cx='12' cy='12' r='9' stroke='%23e2e8f0' stroke-width='3'/%3E%3Cpath d='M12 3a9 9 0 0 1 9 9' stroke='%23019df4' stroke-width='3' stroke-linecap='round'/%3E%3CanimateTransform attributeName='transform' type='rotate' from='0 12 12' to='360 12 12' dur='0.8s' repeatCount='indefinite'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 18px 18px;
	padding-right: 36px;
}

