/* MedSkill – căutare instantanee: lupă în header → câmp + rezultate live */
.ms-search {
	position: relative;
	display: inline-flex;
	align-items: center;
}
.ms-search svg {
	width: 20px;
	height: 20px;
	fill: none;
	stroke: currentColor;
	stroke-width: 2.2;
	stroke-linecap: round;
	stroke-linejoin: round;
}
.ms-search-toggle {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 42px;
	height: 42px;
	padding: 0;
	border: 1px solid #e4e9f5;
	border-radius: 50%;
	background: #fff;
	color: #0e1b4d;
	cursor: pointer;
	transition: background .2s, color .2s, border-color .2s;
}
.ms-search-toggle:hover,
.ms-search.este-deschis .ms-search-toggle {
	border-color: #0b1f6e;
	background: #0b1f6e;
	color: #fff;
}
.ms-search-toggle:focus-visible,
.ms-search-form input:focus-visible,
.ms-search-form button:focus-visible {
	outline: 2px solid #e5232e;
	outline-offset: 2px;
}

/* Formularul se deschide sub lupă */
.ms-search-form {
	position: absolute;
	right: 0;
	top: calc(100% + 12px);
	z-index: 9998;
	display: flex;
	width: min(440px, 92vw);
	padding: 8px;
	border: 1px solid #e4e9f5;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(14, 27, 77, .18);
	opacity: 0;
	transform: translateY(-6px);
	visibility: hidden;
	transition: opacity .18s, transform .18s, visibility .18s;
}
.ms-search.este-deschis .ms-search-form {
	opacity: 1;
	transform: none;
	visibility: visible;
}
.ms-search-form input[type="search"] {
	flex: 1;
	min-width: 0;
	height: 46px;
	padding: 0 16px !important;
	border: 0 !important;
	border-radius: 10px;
	background: #f4f7fd !important;
	color: #0e1b4d !important;
	font-size: 15px;
	-webkit-appearance: none;
	appearance: none;
}
.ms-search-form input[type="search"]::placeholder {
	color: #525d7d;
	opacity: 1;
}
.ms-search-form button[type="submit"] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex: none;
	width: 46px;
	height: 46px;
	margin-left: 8px;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: #e5232e;
	color: #fff;
	cursor: pointer;
	transition: background .2s;
}
.ms-search-form button[type="submit"]:hover {
	background: #c4141f;
}

/* Rezultate */
.ms-cl {
	position: absolute;
	left: 0;
	right: 0;
	top: calc(100% + 8px);
	z-index: 9999;
	max-height: 440px;
	overflow-y: auto;
	border: 1px solid #e4e9f5;
	border-radius: 16px;
	background: #fff;
	box-shadow: 0 24px 60px rgba(14, 27, 77, .18);
	opacity: 0;
	transform: translateY(-6px);
	visibility: hidden;
	transition: opacity .18s, transform .18s, visibility .18s;
}
.ms-cl.este-deschis {
	opacity: 1;
	transform: none;
	visibility: visible;
}
.ms-cl-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 14px;
	border-bottom: 1px solid #eef1f8;
	color: #0e1b4d !important;
	text-decoration: none !important;
	transition: background .15s;
}
.ms-cl-item:last-of-type {
	border-bottom: 0;
}
.ms-cl-item:hover,
.ms-cl-item.este-selectat {
	background: #f4f7fd;
}
.ms-cl-item__img {
	flex: none;
	width: 52px;
	height: 52px;
	overflow: hidden;
	border-radius: 10px;
	background: #e8eefa;
}
.ms-cl-item__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}
.ms-cl-item__txt {
	min-width: 0;
}
.ms-cl-item__tip {
	display: inline-block;
	margin-bottom: 3px;
	padding: 2px 7px;
	border-radius: 5px;
	background: #e8eefa;
	color: #0b1f6e;
	font-size: 10.5px;
	font-weight: 700;
	letter-spacing: .05em;
	line-height: 1.5;
	text-transform: uppercase;
}
.ms-cl-item__tip--curs {
	background: #fde8ea;
	color: #b3101b;
}
.ms-cl-item__titlu {
	display: -webkit-box;
	overflow: hidden;
	color: #0e1b4d;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.35;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
}
.ms-cl-item__titlu mark {
	padding: 0 1px;
	border-radius: 2px;
	background: rgba(229, 35, 46, .16);
	color: inherit;
}
.ms-cl-item__detaliu {
	display: block;
	margin-top: 2px;
	color: #525d7d;
	font-size: 12.5px;
}
.ms-cl-toate,
.ms-cl-gol,
.ms-cl-incarca {
	display: block;
	padding: 14px;
	font-size: 13px;
	font-weight: 600;
	text-align: center;
	text-decoration: none !important;
}
.ms-cl-toate {
	border-top: 1px solid #e4e9f5;
	background: #f4f7fd;
	color: #0b1f6e !important;
	transition: background .15s, color .15s;
}
.ms-cl-toate:hover,
.ms-cl-toate.este-selectat {
	background: #0b1f6e;
	color: #fff !important;
}
.ms-cl-gol,
.ms-cl-incarca {
	color: #333d5c;
	font-weight: 500;
}
.ms-cl-incarca::after {
	content: "";
	display: inline-block;
	width: 12px;
	height: 12px;
	margin-left: 8px;
	vertical-align: -1px;
	border: 2px solid #e4e9f5;
	border-top-color: #e5232e;
	border-radius: 50%;
	animation: ms-cl-rotire .7s linear infinite;
}
@keyframes ms-cl-rotire {
	to { transform: rotate(360deg); }
}

/* Telefon: câmpul ocupă lățimea ecranului, sub header */
@media (max-width: 767px) {
	.ms-search {
		position: static;
	}
	.ms-search-form {
		position: absolute;
		left: 12px;
		right: 12px;
		width: auto;
		top: calc(100% + 8px);
	}
	.ms-cl {
		max-height: 60vh;
	}
}
@media (prefers-reduced-motion: reduce) {
	.ms-search-form,
	.ms-cl {
		transition: none;
	}
	.ms-cl-incarca::after {
		animation: none;
	}
}
