/**
 * Header product search.
 * The field keeps the theme's .in / .sub chrome. This file draws the dropdown.
 */

.header_middle .search_col .pmarket-search {
	position: relative;
	z-index: 6;
	display: flex;
	align-items: center;
	width: 100%;
	max-width: 100%;
}

.header_middle .search_col .pmarket-search .in {
	flex: 1 1 auto;
	width: auto;
	min-width: 0;
	height: 43px;
	padding-left: 12px;
	-webkit-appearance: none;
	appearance: none;
}

.header_middle .search_col .pmarket-search .in::-webkit-search-decoration,
.header_middle .search_col .pmarket-search .in::-webkit-search-cancel-button {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.header_middle .search_col .pmarket-search .sub {
	flex: 0 0 auto;
	width: 64px;
	height: 43px;
	border: 0;
	padding: 0;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23ffffff' d='M10.5 2a8.5 8.5 0 0 1 6.68 13.72l4.15 4.15a1.25 1.25 0 0 1-1.77 1.77l-4.15-4.15A8.5 8.5 0 1 1 10.5 2zm0 2.25a6.25 6.25 0 1 0 0 12.5 6.25 6.25 0 0 0 0-12.5z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: center;
	background-size: 14px 14px;
	-webkit-appearance: none;
	appearance: none;
}

.header_middle .search_col .pmarket-search.is-open .in {
	border-bottom-right-radius: 0 !important;
	border-bottom-color: #e8e8e8 !important;
}

.header_middle .search_col .pmarket-search .in:focus {
	border-color: var(--red) !important;
	outline: none;
}

.header_middle .search_col .pmarket-search.is-open .sub {
	border-bottom-left-radius: 0;
}

.header_middle .search_col .pmarket-search a,
.header_middle .search_col .pmarket-search a:hover,
.header_middle .search_col .pmarket-search a:focus {
	color: #2a2a2a !important;
}

.pmarket-search__panel {
	position: absolute;
	top: calc(100% - 1px);
	right: 0;
	left: 0;
	z-index: 40;
	max-height: min(70vh, 440px);
	overflow: auto;
	-webkit-overflow-scrolling: touch;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 0 0 8px 8px;
	box-shadow: 0 16px 36px rgba(42, 42, 42, 0.14);
	font-family: var(--ploni), "Ploni DL 1.1 AAA", sans-serif;
}

.pmarket-search__panel[hidden] {
	display: none !important;
}

.pmarket-search.is-loading .pmarket-search__panel::before {
	content: "";
	position: sticky;
	top: 0;
	display: block;
	height: 3px;
	background: linear-gradient(90deg, transparent, var(--red, #b62433), transparent);
	background-size: 45% 100%;
	background-repeat: no-repeat;
	animation: pmarket-search-bar 0.9s ease-in-out infinite;
}

.pmarket-search__status {
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 10px;
	margin: 0;
	min-height: 52px;
	padding: 14px 16px;
	color: #707070;
	font-size: 14px;
	line-height: 1.4;
}

.pmarket-search__spinner {
	width: 18px;
	height: 18px;
	flex: 0 0 18px;
	border: 2px solid #e8e8e8;
	border-top-color: var(--red, #b62433);
	border-radius: 50%;
	animation: pmarket-search-spin 0.7s linear infinite;
}

.pmarket-search__item {
	display: flex;
	align-items: center;
	gap: 12px;
	min-height: 64px;
	padding: 8px 12px;
	color: #2a2a2a;
	text-decoration: none;
	border-top: 1px solid #f2f2f2;
}

.pmarket-search__panel > .pmarket-search__item:first-child,
.pmarket-search.is-loading .pmarket-search__item:first-of-type {
	border-top: 0;
}

.pmarket-search__item:hover,
.pmarket-search__item:focus {
	background: #faf6f6;
	color: #2a2a2a;
}

.pmarket-search__item:focus-visible,
.pmarket-search__all:focus-visible {
	outline: 2px solid var(--red, #b62433);
	outline-offset: -2px;
}

.pmarket-search__item img {
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	object-fit: contain;
	background: #f7f7f7;
	border: 1px solid #f0f0f0;
	border-radius: 6px;
}

.pmarket-search__copy {
	min-width: 0;
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	gap: 3px;
}

.pmarket-search__name {
	overflow: hidden;
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 2;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.35;
}

.pmarket-search__price {
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--red, #b62433);
}

.pmarket-search__price .price,
.pmarket-search__price .amount,
.pmarket-search__price ins,
.pmarket-search__price ins .amount {
	color: var(--red, #b62433);
	font-weight: 600;
	text-decoration: none;
}

.pmarket-search__price del,
.pmarket-search__price del .amount {
	color: #9a9a9a;
	font-size: 12px;
	font-weight: 400;
	text-decoration: line-through;
}

.pmarket-search__all {
	position: sticky;
	bottom: 0;
	display: block;
	padding: 12px 14px;
	border-top: 1px solid #e8e8e8;
	background: #fff;
	text-align: center;
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
	color: var(--red, #b62433) !important;
	text-decoration: none;
}

.header_middle .search_col .pmarket-search .pmarket-search__all:hover,
.header_middle .search_col .pmarket-search .pmarket-search__all:focus {
	background: var(--red, #b62433);
	color: #fff !important;
}

@keyframes pmarket-search-spin {
	to { transform: rotate(360deg); }
}

@keyframes pmarket-search-bar {
	0% { background-position: 120% 0; }
	100% { background-position: -120% 0; }
}

@media (prefers-reduced-motion: reduce) {
	.pmarket-search__spinner,
	.pmarket-search.is-loading .pmarket-search__panel::before {
		animation: none;
	}
}

/* Phone: the field opens in the full-width bar under the logo. */
@media only screen and (max-width: 767px) {
	.header_middle .search_col .pmarket-search .in {
		height: 44px;
		font-size: 16px !important;
	}

	.header_middle .search_col .pmarket-search .sub {
		width: 48px;
		height: 44px;
	}

	.pmarket-search__panel {
		max-height: min(62vh, 420px);
		border-radius: 0 0 8px 8px;
	}

	.pmarket-search__item {
		gap: 10px;
		min-height: 60px;
		padding: 8px 10px;
	}

	.pmarket-search__item img {
		width: 44px;
		height: 44px;
		flex-basis: 44px;
	}

	.pmarket-search__name {
		font-size: 14px;
	}
}

/* Short landscape phones and very narrow devices. */
@media only screen and (max-width: 389px),
       only screen and (max-height: 480px) {
	.pmarket-search__panel {
		max-height: 52vh;
	}

	.pmarket-search__item {
		min-height: 52px;
		padding: 6px 8px;
	}

	.pmarket-search__item img {
		width: 40px;
		height: 40px;
		flex-basis: 40px;
	}

	.pmarket-search__name,
	.pmarket-search__price,
	.pmarket-search__all,
	.pmarket-search__status {
		font-size: 13px;
	}
}
