/* ==========================================================================
   Search Form — Consulta horarios e inicio de clases
   Mobile-first
   ========================================================================== */

.search-form {
	padding: 32px 0;
}

/* --- Inner wrapper --- */
.search-form__inner {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 20px;
}

/* --- Title --- */
.search-form__title {
	font-family: 'TT Norms Pro', sans-serif;
	font-size: 30px;
	font-weight: 700;
	line-height: 118%;
	letter-spacing: 0;
	color: #03336A;
	text-align: center;
	margin: 0;
}

/* --- Fields container --- */
.search-form__fields {
	display: flex;
	flex-direction: column;
	gap: 0;
	width: 100%;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
	overflow: hidden;
}

/* --- Select wrapper --- */
.search-form__select-wrap {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 16px 20px;
	border-bottom: 1px solid #E8E8E8;
	position: relative;
}

.search-form__select-wrap:last-of-type {
	border-bottom: none;
}

/* --- Label --- */
.search-form__label {
	font-family: 'TT Norms Pro', sans-serif;
	font-size: 13px;
	font-weight: 500;
	line-height: 120%;
	letter-spacing: 0;
	color: #444444;
}

/* --- Custom Dropdown --- */
.search-form__dropdown {
	position: relative;
}

.search-form__dropdown-toggle {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 8px;
	width: 100%;
	background: transparent;
	border: none;
	padding: 0;
	cursor: pointer;
	font-family: 'TT Norms Pro', sans-serif;
	font-size: 16px;
	font-weight: 500;
	line-height: 120%;
	letter-spacing: 0;
	color: #9E9E9E;
	text-align: left;
}

.search-form__dropdown-toggle.has-value {
	color: var(--dark-blue-500, #03336A);
}

.search-form__dropdown-toggle svg {
	width: 12px;
	height: 12px;
	flex-shrink: 0;
	transition: transform 0.3s ease;
}

.search-form__dropdown.is-open .search-form__dropdown-toggle svg {
	transform: rotate(180deg);
}

/* --- Dropdown List --- */
.search-form__dropdown-list {
	display: none;
	position: absolute;
	top: calc(100% + 8px);
	left: -20px;
	right: -20px;
	background: #fff;
	border: 1px solid #E8E8E8;
	border-radius: 12px;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.10);
	list-style: none;
	margin: 0;
	padding: 8px 0;
	z-index: 1100;
	max-height: 220px;
	overflow-y: auto;
}

.search-form__dropdown.is-open .search-form__dropdown-list {
	display: block;
}

.search-form__dropdown-option {
	font-family: 'TT Norms Pro', sans-serif;
	font-size: 14px;
	font-weight: 400;
	line-height: 140%;
	color: var(--dark-blue-500, #03336A);
	padding: 10px 20px;
	cursor: pointer;
	transition: background 0.15s ease;
}

.search-form__dropdown-option:hover {
	background: #F4F6F8;
}

.search-form__dropdown-option.is-selected {
	background: #EBF3FF;
	font-weight: 500;
	color: #016FDF;
}

/* --- Button --- */
.search-form__btn {
	font-family: 'TT Norms Pro', sans-serif;
	font-size: 16px;
	font-weight: 700;
	line-height: 130%;
	letter-spacing: 0;
	color: #959697;
	background: #E1E2E3;
	border: none;
	border-radius: 40px;
	padding: 15px 26px;
	margin: 16px 20px 20px;
	cursor: pointer;
	transition: background 0.2s ease;
	text-align: center;
	overflow: hidden;
}

.search-form__btn:hover {
	background: #D0D1D2;
	color: #959697;
}

.search-form__btn.is-ready {
	background: #03336A;
	color: #fff;
}

.search-form__btn.is-ready:hover {
	background: #024a8a;
	color: #fff;
}

/* ==========================================================================
   Tablet — 768px a 1023px
   Título en su propia línea, dropdowns + botón en fila horizontal debajo.
   ========================================================================== */

@media (min-width: 768px) {

	.search-form {
		padding: 24px 0;
	}

	.search-form__inner {
		flex-direction: column;
		align-items: center;
		gap: 16px;
	}

	.search-form__title {
		font-size: 18px;
		line-height: 118%;
		letter-spacing: 0;
		color: #03336A;
		text-align: center;
		white-space: nowrap;
		flex-shrink: 0;
	}

	.search-form__fields {
		flex-direction: row;
		align-items: center;
		border-radius: 100px;
		padding: 8px 8px 8px 0;
		height: 67px;
		overflow: visible;
		gap: 0;
		width: 100%;
		max-width: 750px;
		background: #fff;
		border: 1px solid #BEC8D6;
		box-shadow: 0 10px 40px rgba(0, 0, 0, 0.10);
	}

	.search-form__select-wrap {
		flex: 1;
		min-width: 0;
		padding: 12px 16px;
		border-bottom: none;
		border-right: none;
		position: relative;
	}

	.search-form__select-wrap::after {
		content: '';
		position: absolute;
		right: 0;
		top: 50%;
		transform: translateY(-50%);
		width: 1px;
		height: 60%;
		background: #BEC8D6;
	}

	.search-form__select-wrap:last-of-type::after {
		display: none;
	}

	.search-form__btn {
		flex-shrink: 0;
		margin: 0;
	}

	/* Truncar texto de dropdowns si no cabe */
	.search-form__dropdown-value {
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}
}

/* ==========================================================================
   Desktop — min-width: 1024px
   Todo en una sola fila: título + dropdowns + botón.
   ========================================================================== */

@media (min-width: 1024px) {

	.search-form__inner {
		flex-direction: row;
		align-items: center;
		gap: 24px;
	}

	.search-form__title {
		font-size: 20px;
		text-align: left;
		white-space: normal;
		max-width: 165px;
		flex-shrink: 0;
	}

	.search-form__fields {
		flex: 1;
		max-width: 1011px;
	}

	.search-form__select-wrap {
		padding: 12px 20px;
	}
}
