/* Shared search form styling for layout testing prototypes */

.layout-home-search {
	--search-accent: #48206e;
	--search-accent-hover: #3a1a58;
	--search-accent-soft: rgba(72, 32, 110, 0.2);
	--search-accent-softer: rgba(72, 32, 110, 0.14);
	--search-border: rgba(72, 32, 110, 0.22);
	--search-border-focus: rgba(72, 32, 110, 0.55);
	--search-surface: #fff;
	--search-muted: #475569;
	--search-radius: 0.75rem;
	border: 1px solid var(--search-border);
	border-radius: var(--search-radius);
	background: var(--search-surface);
	box-shadow: 0 1px 2px rgba(72, 32, 110, 0.08), 0 4px 16px rgba(72, 32, 110, 0.1);
	overflow: hidden;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.layout-home-search:focus-within {
	border-color: var(--search-border-focus);
	box-shadow: 0 0 0 3px rgba(72, 32, 110, 0.18), 0 4px 16px rgba(72, 32, 110, 0.12);
}

.layout-home-search__mode,
.layout-home-search__input,
.layout-home-search__submit {
	border: 0;
	box-shadow: none;
}

.layout-home-search__mode-wrap {
	position: relative;
	flex-shrink: 0;
	display: flex;
	align-items: stretch;
	border-right: 1px solid var(--search-border);
}

.layout-home-search__mode {
	background-color: var(--search-accent-softer);
	background-image: none;
	color: var(--search-accent);
	font-weight: 600;
	font-size: 0.9rem;
	padding-inline: 0.875rem 1.75rem;
	border-right: 0;
	border-radius: 0;
	max-width: 12rem;
	width: auto;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	cursor: pointer;
}

.layout-home-search__mode-caret {
	position: absolute;
	right: 0.65rem;
	top: 50%;
	transform: translateY(-50%);
	font-size: 0.625rem;
	color: var(--search-accent);
	opacity: 0.9;
	pointer-events: none;
}

.layout-home-search__mode:focus {
	background-color: var(--search-accent-soft);
	background-image: none;
	color: var(--search-accent);
	box-shadow: none;
}

.layout-home-search__mode option {
	background-color: #fff;
	color: #212529;
}

.layout-home-search__input {
	background: transparent;
	color: #1e293b;
	padding-block: 0.7rem;
}

.layout-home-search__input::placeholder {
	color: #94a3b8;
}

.layout-home-search__input:focus {
	background: transparent;
	box-shadow: none;
}

.layout-home-search .layout-home-search__input:not(:focus),
.layout-home-search .layout-home-search__submit {
	border-left: 0;
}

.layout-home-search__submit {
	background: var(--search-accent);
	color: #fff;
	font-weight: 600;
	padding-inline: 1rem;
	transition: background-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.layout-home-search__submit:hover,
.layout-home-search__submit:focus {
	background: var(--search-accent-hover);
	color: #fff;
	box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}

.layout-home-search__submit .js-search-btn-icon {
	color: #fff;
}

.layout-home-search__submit .js-search-btn-text {
	font-size: 0.9rem;
}

.layout-home-search.input-group-lg .layout-home-search__input,
.layout-home-search.input-group-lg .layout-home-search__mode {
	padding-block: 0.8rem;
}

.layout-home-search--grid .layout-home-search__mode,
.layout-home-search--grid .layout-home-search__input,
.layout-home-search--grid .layout-home-search__submit {
	font-size: 0.875rem;
}

.layout-home-search--grid .layout-home-search__mode {
	padding-block: 0.45rem;
	padding-inline: 0.75rem 1.5rem;
}

.layout-home-search--grid .layout-home-search__mode-caret {
	right: 0.5rem;
	font-size: 0.575rem;
}

.layout-home-search--grid .layout-home-search__input {
	padding-block: 0.45rem;
}

.layout-home-search--grid .layout-home-search__submit {
	padding-block: 0.45rem;
	padding-inline: 0.875rem;
}

.layout-home-search--grid .layout-home-search__submit .js-search-btn-text {
	font-size: 0.875rem;
}

.layout-home-search--popup {
	--search-radius: 0.875rem;
}

.layout-home-search--popup .layout-home-search__input {
	border-radius: 0;
}

.layout-home-search--popup .layout-home-search__submit {
	border-radius: 0;
	padding-inline: 1.25rem;
}

.prototype-search-form.layout-home-search {
	--search-radius: 999px;
}

.prototype-search-form .layout-home-search__mode {
	font-size: 0.85rem;
	padding-inline: 0.75rem 1.5rem;
	max-width: 8.5rem;
}

.prototype-search-form .layout-home-search__mode-caret {
	right: 0.5rem;
	font-size: 0.575rem;
}

.prototype-search-form .layout-home-search__input {
	padding-block: 0.55rem;
	font-size: 0.95rem;
}

.prototype-search-form .layout-home-search__submit {
	padding-inline: 0.875rem;
}

.prototype-search-form .layout-home-search__submit .js-search-btn-text {
	display: none;
}

.prototype-search-trigger {
	display: flex;
	align-items: center;
	gap: 0.625rem;
	width: 100%;
	min-height: 2.5rem;
	padding: 0.55rem 1rem;
	border: 1px solid var(--search-border, rgba(72, 32, 110, 0.22));
	border-radius: 999px;
	background: #fff;
	color: var(--search-muted, #475569);
	text-align: left;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(72, 32, 110, 0.08);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, color 0.15s ease;
}

.prototype-search-trigger:hover,
.prototype-search-trigger:focus {
	border-color: var(--search-border-focus, rgba(72, 32, 110, 0.55));
	box-shadow: 0 0 0 3px rgba(72, 32, 110, 0.18);
	color: var(--search-accent, #48206e);
}

.prototype-search-trigger i {
	color: var(--search-accent, #48206e);
	opacity: 0.95;
	flex-shrink: 0;
}

.prototype-search-trigger:hover i,
.prototype-search-trigger:focus i {
	opacity: 1;
}

.prototype-search-modes {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
}

.prototype-search-modes .btn-group {
	display: contents;
}

.prototype-search-modes .btn {
	border-radius: 999px;
	font-size: 0.875rem;
	font-weight: 600;
	padding: 0.5rem 0.875rem;
	border-width: 2px;
	transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.search-mode-label-short {
	display: none;
}

.prototype-search-modes .btn-outline-primary {
	border-color: rgba(72, 32, 110, 0.28);
	color: var(--search-accent);
	background-color: #fff;
	background-image: none;
}

.prototype-search-modes .btn-outline-primary:hover,
.prototype-search-modes .btn-outline-primary:focus {
	background-color: var(--search-accent-softer);
	color: var(--search-accent);
	border-color: rgba(72, 32, 110, 0.45);
}

.prototype-search-modal .prototype-search-modes .btn-outline-primary.active,
.prototype-search-modal .prototype-search-modes .btn-outline-primary.active:active,
.prototype-search-modal .prototype-search-modes .btn-outline-primary.active:focus {
	background-color: #48206e;
	background-image: none;
	border-color: #48206e;
	color: #fff;
	box-shadow: 0 2px 10px rgba(72, 32, 110, 0.35);
}

.prototype-search-modal .prototype-search-modes .btn-outline-primary.active:hover,
.prototype-search-modal .prototype-search-modes .btn-outline-primary.active:focus-visible {
	background-color: #3a1a58;
	border-color: #3a1a58;
	color: #fff;
	box-shadow: 0 2px 10px rgba(72, 32, 110, 0.4);
}

.prototype-search-modal .modal-content {
	border: 1px solid var(--search-border);
	border-radius: 1rem;
	box-shadow: 0 12px 40px rgba(15, 23, 42, 0.12);
}

.layout-header-search-popup-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	padding: 0.45rem 1rem;
	border: 1px solid rgba(72, 32, 110, 0.22);
	border-radius: 999px;
	background: #fff;
	color: #48206e;
	font-weight: 600;
	font-size: 0.95rem;
	line-height: 1.2;
	cursor: pointer;
	box-shadow: 0 1px 2px rgba(72, 32, 110, 0.08);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.15s ease;
}

.layout-header-search-popup-btn:hover,
.layout-header-search-popup-btn:focus {
	border-color: rgba(72, 32, 110, 0.45);
	box-shadow: 0 0 0 3px rgba(72, 32, 110, 0.12);
	background: rgba(72, 32, 110, 0.06);
	color: #48206e;
}

.layout-header-search-popup-btn__icon {
	color: #48206e;
	font-size: 1rem;
}

.layout-header-search-popup-btn--mobile {
	flex-direction: column;
	gap: 0.125rem;
	padding: 0.25rem 0.5rem;
	border-radius: 0.5rem;
	box-shadow: none;
}

.layout-header-search-popup-btn--mobile .layout-header-search-popup-btn__label {
	font-size: 0.7rem;
	font-weight: 600;
	line-height: 1;
}

@media (max-width: 575.98px) {
	.search-mode-label-long {
		display: none;
	}

	.search-mode-label-short {
		display: inline;
	}
}

@media (max-width: 400px) {
	#prototypeSearchModal .modal-dialog {
		margin-inline: 0.75rem;
	}

	.prototype-search-modal .modal-header {
		padding: 0.65rem 0.85rem 0;
	}

	.prototype-search-modal .modal-body {
		padding: 0.5rem 0.85rem 0.85rem;
	}

	.prototype-search-modal .modal-body > .text-muted {
		margin-bottom: 0.5rem !important;
	}

	.prototype-search-modal .prototype-search-modes {
		flex-wrap: nowrap;
		gap: 0.25rem;
		margin-bottom: 0.5rem !important;
	}

	.prototype-search-modal .prototype-search-modes .btn {
		flex: 1 1 0;
		min-width: 0;
		padding-inline: 0.35rem;
	}

	.prototype-search-modal .layout-home-search--popup .layout-home-search__input,
	.prototype-search-modal .layout-home-search--popup .layout-home-search__submit {
		padding-block: 0.55rem;
	}

	.prototype-search-modal .layout-home-search--popup .layout-home-search__submit {
		padding-inline: 0.75rem;
	}
}

@media (min-width: 768px) {
	.navbar--search-popup .container-fluid,
	.navbar--search-popup .row.flex-row,
	.navbar--search-popup #navbarCollapseLinks {
		overflow: visible;
	}

	.navbar--search-popup .prototype-nav-dropdown {
		position: relative;
		display: inline-block;
	}

	.navbar--search-popup .prototype-nav-dropdown__menu {
		left: 50%;
		right: auto;
		top: 100%;
		transform: translateX(-50%) !important;
		margin-top: 0.35rem;
		min-width: 15rem;
		overflow: visible;
		border: 1px solid rgba(0, 0, 0, 0.08);
		border-radius: 0.5rem;
		box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12);
	}

	.navbar--search-popup .prototype-nav-dropdown__menu > li > a {
		border-radius: 0.25rem;
		padding: 0.35rem 0.5rem;
		white-space: nowrap;
	}

	.navbar--search-popup .prototype-nav-dropdown__menu .dropdown-divider {
		display: none;
	}

	.navbar--search-popup .prototype-nav-dropdown__menu .dropend {
		position: relative;
	}

	.navbar--search-popup .prototype-nav-dropdown__menu .dropend > .dropdown-menu {
		position: absolute !important;
		inset: 0 auto auto 100% !important;
		width: auto !important;
		min-width: 14rem;
		margin: 0 0 0 0.5rem !important;
		transform: none !important;
		overflow: visible;
		border: 1px solid rgba(0, 0, 0, 0.08);
		border-radius: 0.5rem;
		box-shadow: 0 0.5rem 1.25rem rgba(0, 0, 0, 0.12);
		z-index: 1061;
	}

	.navbar--search-popup .row.flex-row {
		display: grid;
		grid-template-columns: repeat(5, minmax(0, 1fr));
		align-items: center;
		width: 100%;
		margin-inline: 0;
	}

	.navbar--search-popup .row.flex-row > #navbarCollapseLinks {
		grid-column: 1 / -1;
		grid-row: 1;
		display: grid !important;
		grid-template-columns: subgrid;
		width: 100% !important;
		max-width: 100% !important;
		flex: none !important;
		justify-content: unset !important;
	}

	.navbar--search-popup .row.flex-row > #navbarCollapseLinks > .nav-item {
		flex: none;
		width: auto;
		justify-content: center;
	}

	.navbar--search-popup .row.flex-row > #navbarCollapseLinks > .nav-item:nth-child(1) {
		grid-column: 1;
	}

	.navbar--search-popup .row.flex-row > #navbarCollapseLinks > .nav-item:nth-child(2) {
		grid-column: 2;
	}

	.navbar--search-popup .row.flex-row > #navbarCollapseLinks > .nav-item:nth-child(3) {
		grid-column: 3;
	}

	.navbar--search-popup .row.flex-row > #navbarCollapseLinks > .nav-item:nth-child(4) {
		grid-column: 4;
	}

	.navbar--search-popup .row.flex-row > #navbarCollapseLinks .nav-link {
		justify-content: center !important;
		padding-inline: 0.5rem;
	}

	.navbar--search-popup .row.flex-row > #navbarCollapseSearch {
		grid-column: 5;
		grid-row: 1;
		position: relative;
		top: auto;
		right: auto;
		transform: none;
		width: auto !important;
		max-width: none !important;
		flex: none !important;
		margin-top: 0 !important;
		padding: 0 !important;
		justify-self: center;
		z-index: 1;
	}
}

@media (min-width: 768px) and (max-width: 1199.98px) {
	.navbar--search-popup .bg-main-nav {
		font-size: 1.05rem;
	}

	.navbar--search-popup .bg-main-nav .nav-link {
		padding-inline: 0.35rem;
		white-space: normal;
		line-height: 1.15;
		text-align: center;
	}

	.navbar--search-popup .bg-main-nav img {
		width: 130px;
		height: auto;
	}

	.navbar--search-popup #navbarCollapseLinks {
		font-size: 0.95rem;
	}

	.navbar--search-popup #navbarCollapseLinks .nav-link {
		white-space: normal;
		line-height: 1.15;
		padding-inline: 0.35rem;
	}
}
