/* Header search modal */

.search-form-wrapper .search-input-icon,
.search-form-wrapper .search-input-shortcut {
	display: none;
}

.mg-search-box .msearch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: auto;
	height: auto;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: transparent;
	box-shadow: none;
	text-decoration: none;
	transition: color 0.2s ease;
}

.mg-search-box .msearch::before,
.mg-search-box .msearch::after {
	content: none;
	display: none;
}

.mg-search-box .msearch i {
	display: block;
	line-height: 1;
	text-decoration: none;
}

.mg-search-box .msearch:hover,
.mg-search-box .msearch:focus {
	background: transparent;
	box-shadow: none;
	text-decoration: none;
	outline: none;
}

body.header-search-modal-open {
	overflow: hidden;
	padding-right: 0 !important;
}

.header-search-modal {
	/*background: rgba(0, 0, 0, 0.46);*/
	padding-right: 0 !important;
	overflow-x: hidden;
	overflow-y: hidden;
	transition: background 0.38s ease;
}

.header-search-modal.is-animating-out {
	background: rgba(0, 0, 0, 0);
	transition-duration: 0.28s;
}

.modal-backdrop {
	background-color: #000;
	transition: opacity 0.38s ease;
}

.modal-backdrop.show {
	opacity: 0.46 !important;
}

.modal-backdrop.search-modal-backdrop-closing {
	opacity: 0 !important;
	transition-duration: 0.28s;
}

.header-search-modal.show {
	display: flex !important;
	align-items: center;
	justify-content: center;
	
}

.header-search-modal.fade .modal-dialog {
	transition: none;
	transform: none;
}

.header-search-modal .modal-dialog {
	width: calc(100% - 2rem);
	max-width: 820px;
	margin: 1rem auto;
}

.header-search-modal .modal-content {
	max-height: calc(100vh - 2rem);
	max-height: calc(100dvh - 2rem);
	background: rgba(15, 18, 24, 0.96);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 12px;
	overflow: hidden;
	will-change: transform, opacity;
	transform: translate3d(0, 0, 0) scale(1);
	opacity: 1;
	box-shadow: 0 10px 28px rgba(0, 0, 0, 0.34);
}

.header-search-modal.is-animating-in .modal-content {
	animation: header-search-modal-in 0.72s cubic-bezier(0.25, 1, 0.5, 1) both;
}

.header-search-modal.is-animating-out .modal-content {
	opacity: 0;
	transform: scale(0.55) translateY(22px);
	transition:
		opacity 0.40s cubic-bezier(0.5, 0, 0.75, 0),
		transform 0.40s cubic-bezier(0.5, 0, 0.75, 0);
}

@keyframes header-search-modal-in {
	0% {
		opacity: 0;
		transform: scale(0.55) translateY(22px);
	}

	100% {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

@media (prefers-reduced-motion: reduce) {
	.header-search-modal .modal-content,
	.header-search-modal.is-animating-in .modal-content,
	.header-search-modal.is-animating-out .modal-content {
		animation: none !important;
		transition: none !important;
		transform: none !important;
		opacity: 1 !important;
	}

	.modal-backdrop.search-modal-backdrop-closing,
	.header-search-modal.is-animating-out {
		transition: none !important;
	}

	.header-search-modal-link {
		transition: none;
	}
}

.header-search-modal .modal-header {
	position: absolute;
	top: 20px;
	right: 20px;
	justify-content: flex-end;
	padding: 0;
	border-bottom: 0;
	z-index: 2;
}

.header-search-modal .modal-title {
	font-size: clamp(2rem, 2vw, 3rem);
	font-weight: 600;
	line-height: 1.06;
	letter-spacing: -0.04em;
	color: #ffffff;
	text-align: center;
}

.header-search-modal .close {
	margin: 0;
	padding: 0;
	border: 0 !important;
	border-color: transparent !important;
	background: transparent !important;
	background-image: none !important;
	color: rgba(255, 255, 255, 0.78);
	font-size: 2.4rem;
	line-height: 1;
	opacity: 1;
	text-shadow: none !important;
	box-shadow: none !important;
	-webkit-box-shadow: none !important;
	outline: none !important;
	appearance: none;
	-webkit-appearance: none;
	border-radius: 0 !important;
}

.header-search-modal .close:hover,
.header-search-modal .close:focus,
.header-search-modal .close:active {
	color: #ffffff;
	opacity: 1;
	border: 0 !important;
	background: transparent !important;
	box-shadow: none !important;
	outline: none !important;
}

.header-search-modal .modal-body {
	padding: 34px 32px 24px;
	overflow: visible;
}

.header-search-modal-shell {
	display: flex;
	flex-direction: column;
	gap: 28px;
}

.header-search-modal-form {
	width: 100%;
}

.header-search-modal-links {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

.header-search-modal-links-label {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.1em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.42);
}

.header-search-modal-links-grid {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px 10px;
}

.header-search-modal-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 34px;
	padding: 5px 16px 5px 14px;
	border: 1px solid rgba(255, 255, 255, 0.14);
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.075);
	color: rgba(255, 255, 255, 0.86);
	font-size: 12.5px;
	font-weight: 500;
	line-height: 1.05;
	letter-spacing: 0.01em;
	text-decoration: none;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
	transition: transform 0.18s ease, opacity 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease;
}

.header-search-modal-link-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 14px;
	height: 14px;
	font-size: 12px;
	line-height: 1;
	color: inherit;
	opacity: 0.82;
	flex: 0 0 auto;
}

.header-search-modal-link-icon i {
	line-height: 1;
}

.header-search-modal-link-text {
	display: inline-block;
}

.header-search-modal-link.is-active,
.header-search-modal-link:focus-visible {
	color: #111111;
	text-decoration: none;
	background: #ffffff;
	border-color: #ffffff;
	outline: 0;
	box-shadow: 0 10px 24px rgba(0, 0, 0, 0.24);
}

.header-search-modal-link:hover,
.header-search-modal-link:focus {
	color: #111111;
	text-decoration: none;
	background: #ffffff;
	border-color: #ffffff;
	transform: translateY(-2px);
	box-shadow: 0 12px 20px rgba(0, 0, 0, 0.2);
	outline: none;
}

.header-search-modal .header-search-modal-form #searchform .input-group,
.header-search-modal .header-search-modal-form .search-input-group {
	position: relative;
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 12px;
	height: 64px;
	min-height: 64px;
	padding: 0 10px 0 20px;
	background: rgba(255, 255, 255, 0.07);
	border: 2px solid #11843f;
	border-radius: 18px;
	box-shadow: none;
	overflow: hidden;
}

.header-search-modal .header-search-modal-form #searchform .form-control,
.header-search-modal .header-search-modal-form .search-input {
	flex: 1 1 auto;
	min-width: 0;
	height: 44px;
	min-height: 0;
	margin: 0;
	font-size: 16px;
	line-height: 44px;
	padding: 0;
	border: 0;
	color: #ffffff;
	background: transparent;
	caret-color: #11843f;
	box-shadow: none;
}

.header-search-modal .header-search-modal-form #searchform .form-control::placeholder,
.header-search-modal .header-search-modal-form .search-input::placeholder {
	color: rgba(255, 255, 255, 0.36);
	font-weight: 300;
}

.header-search-modal .header-search-modal-form .search-input-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: rgba(255, 255, 255, 0.48);
	font-size: 18px;
	flex: 0 0 auto;
}

.header-search-modal .header-search-modal-form #searchform .btn-default {
	display: flex;
	align-items: center;
	justify-content: center;
	flex: 0 0 auto;
	align-self: center;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
}

.header-search-modal .header-search-modal-form #searchform .input-group-btn {
	display: flex;
	align-items: center;
	align-self: center;
	flex: 0 0 auto;
	height: auto;
	min-height: 0;
	margin: 0;
	padding: 0;
}

.header-search-modal .header-search-modal-form .btn-search,
.header-search-modal .header-search-modal-form #searchform .btn {
	min-width: 120px;
	height: 48px;
	min-height: 48px;
	max-height: 48px;
	padding: 0 20px;
	border: 0;
	border-radius: 12px;
	background: #11843f;
	color: #ffffff;
	font-size: 14px;
	font-weight: 700;
	line-height: 1;
	box-shadow: none;
	white-space: nowrap;
	align-self: center;
	box-sizing: border-box;
}

.header-search-modal .header-search-modal-form .btn-search:hover,
.header-search-modal .header-search-modal-form #searchform .btn:hover,
.header-search-modal .header-search-modal-form .btn-search:focus,
.header-search-modal .header-search-modal-form #searchform .btn:focus {
	background: #0d6b33;
	color: #ffffff;
}

.header-search-modal-footer {
	padding: 12px 32px;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.header-search-modal-hint {
	display: inline-flex;
	align-items: center;
	gap: 16px;
	font-size: 11px;
	font-weight: 500;
	color: rgba(255, 255, 255, 0.3);
	text-transform: lowercase;
}

.header-search-modal-hint-group {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.header-search-modal-hint-key {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 34px;
	height: 22px;
	padding: 0 7px;
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.48);
	font-size: 10px;
	font-weight: 700;
	text-transform: none;
}

.header-search-modal-hint-key--wide {
	min-width: 40px;
}

.header-search-modal-close-link {
	padding: 0;
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.35);
	font-size: 12px;
	font-weight: 500;
	line-height: 1.2;
	transition: color 0.16s ease;
}

.header-search-modal-close-link:hover,
.header-search-modal-close-link:focus {
	color: #ffffff;
	outline: none;
}

@media (max-width: 575.98px) {
	.header-search-modal .modal-dialog {
		width: calc(100% - 2.5rem);
		max-width: 380px;
		margin: 1rem auto;
	}

	.header-search-modal .modal-content {
		max-height: calc(100vh - 4.25rem);
		max-height: calc(100dvh - 4.25rem);
		border-radius: 15px;
	}

	.header-search-modal .modal-header {
		top: 14px;
		right: 14px;
	}

	.header-search-modal .modal-body {
		padding: 22px 15px 14px;
	}

	.header-search-modal-shell {
		gap: 16px;
	}

	.header-search-modal .modal-title {
		font-size: 1.7rem;
		line-height: 1.02;
		padding-right: 24px;
		padding-left: 24px;
	}

	.header-search-modal .header-search-modal-form #searchform .input-group,
	.header-search-modal .header-search-modal-form .search-input-group {
		height: 54px;
		min-height: 54px;
		padding: 0 6px 0 14px;
		gap: 8px;
		border-radius: 14px;
	}

	.header-search-modal .header-search-modal-form #searchform .form-control,
	.header-search-modal .header-search-modal-form .search-input {
		font-size: 15px;
	}

	.header-search-modal .header-search-modal-form .btn-search,
	.header-search-modal .header-search-modal-form #searchform .btn {
		min-width: 104px;
		height: 40px;
		min-height: 40px;
		max-height: 40px;
		padding: 0 14px;
		border-radius: 10px;
	}

	.header-search-modal-links {
		gap: 10px;
	}

	.header-search-modal-links-grid {
		gap: 8px;
	}

	.header-search-modal-link {
		min-height: 32px;
		padding: 5px 14px;
		font-size: 12px;
	}

	.header-search-modal-footer {
		padding: 10px 15px 12px;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		gap: 10px;
	}

	.header-search-modal-hint {
		flex-wrap: nowrap;
		gap: 0;
		font-size: 10px;
	}

	.header-search-modal-hint-group {
		gap: 6px;
	}

	.header-search-modal-hint-group:first-child,
	.header-search-modal-hint-group:last-child {
		display: none;
	}

	.header-search-modal-hint-group:nth-child(2) {
		font-size: 10px;
		gap: 6px;
	}

	.header-search-modal-hint-group:nth-child(2) .header-search-modal-hint-key {
		font-size: 10px;
		color: rgba(255, 255, 255, 0.72);
	}

	.header-search-modal-close-link {
		margin-left: auto;
		font-size: 0;
		line-height: 1;
	}

	.header-search-modal-close-link::after {
		content: "Cerrar";
		font-size: 11px;
		font-weight: 500;
		line-height: 1.2;
	}
}
