/* Menu item at the top of the WordPress dashboard */

.brikpanel-search-menu-item-mobile:hover {
	cursor: pointer;
}

.brikpanel-search-menu-item-mobile {
	display: none;
}

.ab-icon::before {
	content: "\f179";
}

.brikpanel-search-menu-item-mobile::before {
	content: "\f179";
	top: 1px;
	font-size: 2.25rem;
}

.brikpanel-search-menu-item {
	display: flex;
	align-items: center;
}

.brikpanel-search-menu-item:hover {
	cursor: pointer;
}

.brikpanel-search-menu-item .icon {
	width: 1rem !important;
	margin-right: 0.5rem !important;
}

.brikpanel-search-menu-item .placeholder {
	text-align: left;
	flex-grow: 1;
}

.brikpanel-search-menu-item .shortcut {
	font-size: 0.6rem !important;
	margin-left: 6px !important;
	margin-top: 1px !important;
	border-radius: 0.375rem !important;
	padding: 0.1rem 0.275rem !important;
	border: 1px solid !important;
	line-height: 1.4 !important;
	opacity: 0.8;
}

.brikpanel-search-menu-item #shortcut-key {
	font-size: 0.6rem !important;
	line-height: 1.4 !important;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', sans-serif;
}

/* The popup */

.brikpanel-search-overlay {
	position: fixed !important;
	top: 0;
	left: 0;
	z-index: 200;
	display: flex;
	height: 100vh !important;
	width: 100vw !important;
	background-color: #0003;
	margin-left: -10px !important;
	overflow: auto;
}

.brikpanel-search-modal {
	margin: 0 auto !important;
	margin-top: 4rem !important;
	margin-bottom: 4rem !important;
	padding: 1rem !important;
	width: 100% !important;
	height: fit-content !important;
	max-width: 40rem;
	display: flex;
	flex-direction: column;
	min-height: 0;
	border-radius: 1rem !important;
	box-shadow: 0 10px 15px -3px #0000001a,0 4px 6px -4px #0000001a !important;
	background: #fff;
	color: #444 !important;
}

.brikpanel-search-modal * {
	line-height: 1 !important;
	font-size: 0.9rem !important;
}

.brikpanel-search-modal .input-container {
	border-radius: 0.75rem !important;
	outline: 1px solid #a8a8a8;
	display: flex;
}

.brikpanel-search-modal .focus {
	outline: 2px solid #333;
}

.brikpanel-search-modal .input-container .icon {
	width: 1rem !important;
	margin-right: 0.5rem !important;
	margin-left: 0.5rem !important;
	flex-shrink: 0;
}

.brikpanel-search-modal input {
	border: none;
	border-radius: 0.75rem !important;
	flex-grow: 1;
	line-height: 2.4 !important;
	font-size: 1rem !important;
}

.brikpanel-search-modal input:focus {
	outline: none;
}

.brikpanel-search-modal input::placeholder {
	color: #616161;
}

.brikpanel-search-modal .heading {
	color: #6c6c6c;
	font-weight: bold !important;
	font-size: 0.95rem !important;
	line-height: 1 !important;
	margin-top: 1.6rem !important;
	margin-bottom: 0.5rem !important;
	margin-left: 0.65rem !important;
}

.brikpanel-search-modal ul {
	display: flex;
	flex-direction: column;
}

.brikpanel-search-modal li {
	line-height: 1 !important;
	padding: 0.65rem !important;
	border-radius: 1rem !important;
}

.brikpanel-search-modal li a {
	display: flex !important;
	flex-direction: column;
	gap: 0.5rem;
	color: initial;
	height: initial !important;
	padding: initial !important;
}

.brikpanel-search-modal li:hover {
	background-color: #f7f7f7 !important;
	cursor: pointer;
}

.brikpanel-search-modal .status-badge {
	border-radius: 0.5rem !important;
	margin-left: 0.25rem !important;
	padding: 0.125rem 0.5rem !important;
}

.brikpanel-search-modal .order-info {
	color: #727272;
}

.brikpanel-search-modal .matching-order-product {
	margin-top: 0.25rem !important;
}

.brikpanel-search-modal .hint-text {
	color: #727272;
	line-height: 1.3 !important;
	margin-left: 0.65rem !important;
	margin-right: 0.65rem !important;
	margin-top: 0.85rem !important;
	/* Prevent scrollbar from showing at smallest height. */
	margin-bottom: 0.1rem !important;
}

.result-list {
	overflow-y: auto;
}

.brikpanel-search-modal .section-divider {
	margin-top: 1.6rem !important;
}

/* Because of the padding for the hover highlight for each of the search results,
they need less margin above the section dividing line. */
section:has(.result-list ul) + .section-divider {
	margin-top: 0.95rem !important;
}

/* Utility classes */

.hidden {
	display: none;
}

.text-sm {
	font-size: 0.8rem !important;
}

/* Small screens */

@media screen and (max-width: 782px) {
	#wp-admin-bar-brikpanel-search .ab-item:hover {
		background: #2c3338 !important;
	}
	#wp-admin-bar-brikpanel-search {
		display: initial !important;
	}
	.brikpanel-search-modal {
		max-width: 80%;
	}
	.results li {
		display: flex !important;
	}
	.brikpanel-search-menu-item {
		display: none;
	}
	.brikpanel-search-menu-item-mobile {
		display: block;
	}
}
