/* ==========================================================
   ПОШУК: базові стилі + світла тема
========================================================== */

/* ===== Шапка: пошук + блок для продавця ===== */

.vs-header-search-seller {
	display: flex;
	align-items: flex-start;
	gap: 20px;
	width: 100%;
}

/* Ліва колонка */
.vs-header-search-seller__search {
	flex: 1 1 auto;
	min-width: 0;
}

.vs-header-search-seller__search .vs-search-form {
	width: 100%;
	margin: 0;
}

.vs-header-search-seller__search .vs-search-box {
	position: relative;
	width: 100%;
}

.vs-header-search-seller__search .vs-search-input {
	width: 100%;
	height: 42px;
	margin: 0;
	box-sizing: border-box;
}

.vs-header-search-seller__search .vs-search-submit {
	height: 42px;
	margin: 0;
	box-sizing: border-box;
}

/* Права колонка */
.vs-header-search-seller__seller {
	flex: 0 0 270px;
	width: 270px;
	max-width: 270px;
	min-width: 270px;
	display: flex;
	flex-direction: column;
	align-items: center;
}

.vs-header-search-seller__seller-top {
	width: 100%;
	height: 42px;
	display: flex;
	align-items: center;
	justify-content: center;
	margin: 0 0 12px 0;
}

.vs-header-search-seller__seller-top .add_material {
	margin: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 42px;
	box-sizing: border-box;
	white-space: nowrap;
}

.vs-header-search-seller__seller-bottom {
	width: 100%;
	text-align: center;
}

.vs-header-search-seller__text {
	margin: 0 0 6px 0;
	font-size: 16px;
	line-height: 1.35;
	text-align: center;
	color: #222;
}

.vs-header-search-seller__link-wrap {
	margin: 0;
}

.vs-header-search-seller__link {
	color: #4e6f93;
	text-decoration: underline;
}

.vs-header-search-seller__link:hover {
	text-decoration: underline;
}

.vs-header-search-seller p {
	margin-top: 0;
}

/* ===== Рядок з пошуковим запитом ===== */

.vs-query-line {
	margin: 12px 0 0;
	font-size: 16px;
	color: #444;
}

.vs-query-line span {
	font-weight: 700;
	color: #111;
}

/* ===== Форма пошуку ===== */

.vs-search-form {
	margin: 0 0 10px;
}

.vs-search-box {
	position: relative;
	display: block;
	max-width: 100%;
	box-sizing: border-box;
}

.vs-search-input {
	display: block;
	width: 100%;
	height: 2.8em !important;
	padding: 0 58px 0 16px;
	border: 2px solid #5f9cdb !important;
	border-radius: 20px !important;
	background: #efefef;
	color: #444;
	font-size: 16px;
	line-height: 52px;
	box-sizing: border-box;
	box-shadow: none;
}

.vs-search-input::placeholder {
	color: #666;
	opacity: 1;
}

.vs-search-input:focus {
	outline: none;
	border-color: #9fb4c7 !important;
	background: #f3f3f3;
	box-shadow: none;
}

.vs-search-submit {
	position: absolute;
	top: 50%;
	right: 10px;
	transform: translateY(-50%);
	width: 24px;
	height: 24px;
	padding: 0;
	margin: 0;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
	font-size: 0;
	cursor: pointer;
	z-index: 3;
	background-color: transparent !important;
	background-repeat: no-repeat;
	background-position: center;
	background-size: 20px 20px;
	background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236f8aa0' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><circle cx='11' cy='11' r='7'/><line x1='21' y1='21' x2='16.65' y2='16.65'/></svg>");
}

.vs-search-submit::before {
	display: none;
	content: none;
}

.vs-search-submit:hover,
.vs-search-submit:focus,
.vs-search-submit:active {
	background-color: transparent !important;
	border: none !important;
	outline: none !important;
	box-shadow: none !important;
}

/* ===== Live dropdown ===== */

.vs-live-results {
	position: absolute;
	top: calc(100% + 8px);
	left: 0;
	right: 0;
	z-index: 9999;
	max-height: 520px;
	overflow-y: auto;
	padding: 6px 0;
	background: #fff;
	border: 1px solid #dbe2ea;
	border-radius: 7px;
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.12);
}

.vs-live-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 12px 14px;
	border-bottom: 1px solid #eef2f6;
	transition: background 0.2s ease;
}

.vs-live-item:last-child {
	border-bottom: none;
}

.vs-live-item:hover {
	background: #f8fbff;
}

.vs-live-link {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	flex: 1 1 auto;
	min-width: 0;
	color: inherit;
	text-decoration: none;
}

.vs-live-thumb {
	flex: 0 0 64px;
	width: 64px;
	height: 64px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: hidden;
	border-radius: 8px;
	background: #f3f5f7;
}

.vs-live-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.vs-live-noimg {
	padding: 4px;
	font-size: 12px;
	line-height: 1.2;
	color: #888;
	text-align: center;
}

.vs-live-content {
	flex: 1 1 auto;
	min-width: 0;
}

.vs-live-head {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 6px;
}

.vs-live-title {
	flex: 1 1 auto;
	min-width: 0;
	font-size: 14px;
	line-height: 1.35;
	font-weight: 700;
	color: #4b80ba;
	word-break: break-word;
}

.vs-live-price {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 10px;
	border: 1px solid #f3c7c2;
	border-radius: 999px;
	background: #fff1f0;
	color: #d93025;
	font-size: 14px;
	line-height: 1.2;
	font-weight: 700;
	white-space: nowrap;
}

.vs-live-excerpt {
	font-size: 13px;
	line-height: 1.4;
	color: #666;
	word-break: break-word;
}

.vs-live-empty,
.vs-live-loading {
	padding: 18px 16px;
	font-size: 14px;
	color: #666;
	text-align: center;
}

.vs-live-footer {
	padding: 12px 14px;
	border-top: 1px solid #eef2f6;
	background: #fafbfc;
	text-align: center;
}

/* ===== Статуси і пусті результати ===== */

.vs-search-status {
	margin: 10px 0 20px;
	padding: 10px 15px;
	border: 1px solid #dae1e8;
	border-radius: 5px;
	background: #f4f4f4;
	color: #333;
	font-size: 15px;
	text-align: center;
}

.vs-results-empty {
	padding: 30px 20px;
	border: 1px dashed #d7dee7;
	border-radius: 12px;
	background: #fafbfc;
	color: #555;
	font-size: 16px;
	text-align: center;
}

.vs-search-template-results::after {
	content: "";
	display: block;
	clear: both;
}

/* ===== Кнопки ===== */

.vs-load-more-wrap {
	margin: 20px 0 10px;
	text-align: center;
}

.vs-load-more-button,
.vs-live-all-results {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-width: 220px;
	border: 2px solid #fff;
	border-radius: 4px;
	background: #5f9cdb;
	color: #fff !important;
	font-size: 16px;
	font-weight: 400;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.18);
	transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease, color 0.2s ease;
}

.vs-load-more-button {
	padding: 10px 20px;
}

.vs-live-all-results {
	padding: 8px 15px;
}

.vs-load-more-button::before,
.vs-live-all-results::before {
	display: inline-block;
	font-family: "Font Awesome 5 Free";
	font-weight: 900;
	font-size: 14px;
	line-height: 1;
}

.vs-load-more-button::before {
	content: "\f063";
}

.vs-live-all-results::before {
	content: "\f061";
}

.vs-load-more-button:hover,
.vs-live-all-results:hover,
.vs-live-all-results:focus-visible {
	background: #4b80ba;
	color: #fff;
	outline: none;
	box-shadow: 0 3px 8px rgba(0, 0, 0, 0.22);
}

.vs-load-more-button:active,
.vs-live-all-results:active {
	transform: translateY(1px);
}

.vs-live-all-results:focus {
	outline: none;
	box-shadow: none;
}

.vs-load-more-button.is-loading {
	opacity: 0.7;
	cursor: wait;
}

.vs-load-more-button.is-loading::before {
	content: "\f021";
	animation: vs-load-more-spin 0.9s linear infinite;
}

.vs-load-more-button[hidden] {
	display: none !important;
}

@keyframes vs-load-more-spin {
	from {
		transform: rotate(0deg);
	}
	to {
		transform: rotate(360deg);
	}
}

/* ===== Додаткові елементи ===== */

.button-favorites button {
	float: right;
	width: 35px;
	margin: 0 3px 0 0;
	padding: 3px 5px;
	border-radius: 20px;
	background: #5f9cdb;
	color: #fff;
	font-size: 15px;
	text-transform: inherit;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

/* ===== Адаптив ===== */

@media (max-width: 980px) {
	.vs-header-search-seller {
		flex-direction: column;
		align-items: stretch;
		gap: 14px;
	}

	.vs-header-search-seller__search {
		width: 100%;
	}

	.vs-header-search-seller__seller {
		flex: 0 0 auto;
		width: 100%;
		max-width: 100%;
		min-width: 0;
	}

	.vs-header-search-seller__seller-top {
		justify-content: center;
	}
}

@media (max-width: 900px) {
	.vs-search-input {
		height: 48px;
		line-height: 46px;
		padding-right: 50px;
	}
}

@media (max-width: 600px) {
	.vs-search-input {
		height: 44px;
		line-height: 42px;
		font-size: 15px;
	}

	.vs-load-more-button,
	.vs-live-all-results {
		width: 100%;
		max-width: 320px;
	}
}


@media (max-width: 1000px) {
	.vs-header-search-seller__text {
		display: none;
	}
}


.add_material{
    padding: 8px 15px;
border: 2px solid;
    margin: 0 5px 5px 5px;
	background: #5F9CDB;
    font-size: 1.2rem;
    text-align: center;
    border-radius: 3px;
    color: #fff;
    display: inline-block;
    text-decoration: none !important;
    -webkit-transition-duration: 0.4s;
    transition-duration: 0.4s;
}
.add_material:hover{
    background: #4989BE;
    color: #FFFFFF;
    display: inline-block;
    text-decoration: none !important;
    -webkit-transition-duration: 0.4s;
    transition-duration: 0.4s;
}


@media (max-width: 800px) {
	.vs-header-search-seller__seller-top .add_material {
		display: none;
	}
}


@media (max-width: 800px) {
    .vs-header-search-seller__seller-top {
        display: none;
    }
}


@media (min-width: 1001px) {
	.vs-header-search-seller__search .vs-search-box {
		position: relative;
	}

	.vs-header-search-seller__search .vs-live-results {
left: -270px;
        right: auto;
        width: 740px;
        max-width: 90vw;
	}
}



















/* ==========================================================
   ПОШУК: темна тема
========================================================== */

html.dark-mode .vs-query-line {
	color: var(--wp--preset--color--cyan-bluish-gray);
}

html.dark-mode .vs-query-line span {
	color: #e36266;
}

html.dark-mode .vs-search-input {
	background: #555 !important;
	color: antiquewhite !important;
}

html.dark-mode .vs-search-input::placeholder {
	color: #ddd !important;
}

html.dark-mode .vs-live-results {
	background: #1d1d1e;
	border-color: #131313;
	box-shadow: 0 14px 36px rgba(0, 0, 0, 0.6);
}

html.dark-mode .vs-live-item {
	border-bottom: 1px solid #131313;
}

html.dark-mode .vs-live-item:hover {
	background: #262626;
}

html.dark-mode .vs-live-footer {
	background: #1d1d1e;
	border-top: 1px solid #111;
}

html.dark-mode .vs-search-status {
	background: #1d1d1e;
	border-color: #1d1d1e;
	color: #ddd;
}