/**
 * aiModelka — стили на странице товара витрины: компактный блок с кнопками под галереей
 * и пиктограмма, в которую он сворачивается.
 *
 * Блок видит только тот, кто может редактировать товар, но стоит он в оформлении магазина и не
 * должен с ним спорить: светлые кнопки, тонкие рамки, серый обычный текст. Кнопки несут класс
 * «button» WooCommerce, поэтому их правила записаны сильнее правил тем. Окошко «Упорядочить фото»
 * — в файле aimodelka-photos.css: оно одно на витрину и редактор товара. Админские стили плагина
 * на витрину не подключаются.
 */

/* Блок стоит следом за зоной галереи, под рядом миниатюр. */
.aimodelka-storefront {
	clear: both;
	margin: 26px 0 0;
}

/* Развёрнутый блок: тонкая светлая рамка, справа поле под «×». */
.aimodelka-storefront__panel {
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	box-sizing: border-box;
	padding: 10px 36px 10px 10px;
	border: 1px solid #e4e4e8;
	border-radius: 8px;
}

/* Состояние печатает сервер: страница сразу открывается в нужном виде, без мигания. */
.aimodelka-storefront--collapsed .aimodelka-storefront__panel {
	display: none;
}

.aimodelka-storefront__buttons {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.aimodelka-storefront button.button.aimodelka-storefront__button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-sizing: border-box;
	width: 100%;
	height: 40px;
	min-height: 40px;
	margin: 0;
	padding: 0 10px;
	border: 1px solid #e2e2e7;
	border-radius: 6px;
	background: #f9f9fb;
	box-shadow: none;
	color: #55555e;
	font-size: 14px;
	font-weight: 400;
	letter-spacing: normal;
	line-height: 1.2;
	text-transform: none;
}

.aimodelka-storefront button.button.aimodelka-storefront__button:hover,
.aimodelka-storefront button.button.aimodelka-storefront__button:focus {
	border-color: #d4d4db;
	background: #f1f1f4;
	color: #3a3a42;
}

/* Кнопка типа: картинка и название — от левого края. */
.aimodelka-storefront button.button.aimodelka-kind-button {
	justify-content: flex-start;
	padding-left: 8px;
	text-align: left;
}

.aimodelka-storefront .aimodelka-kind-button__icon {
	width: 24px;
	height: 24px;
	border-radius: 5px;
}

.aimodelka-storefront .aimodelka-kind-button__name {
	font-weight: 400;
}

/* «×» — неброский, в правом верхнем углу блока. */
.aimodelka-storefront button.aimodelka-storefront__hide {
	position: absolute;
	top: 6px;
	right: 6px;
	width: 24px;
	height: 24px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	color: #9a9aa3;
	font-size: 18px;
	font-weight: 400;
	line-height: 24px;
	cursor: pointer;
}

.aimodelka-storefront button.aimodelka-storefront__hide:hover,
.aimodelka-storefront button.aimodelka-storefront__hide:focus {
	background: transparent;
	color: #55555e;
}

/* Свёрнутый блок — только знак aiModelka, без рамки и фона. */
.aimodelka-storefront button.aimodelka-storefront__show {
	display: block;
	width: 30px;
	height: 30px;
	min-height: 0;
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	cursor: pointer;
}

.aimodelka-storefront:not(.aimodelka-storefront--collapsed) button.aimodelka-storefront__show {
	display: none;
}

.aimodelka-storefront__show img {
	display: block;
	width: 30px;
	height: 30px;
	margin: 0;
}

.aimodelka-storefront__status {
	margin: 0;
	font-size: 0.9em;
	line-height: 1.4;
}

.aimodelka-storefront__status:empty {
	display: none;
}

/* Состояния строки — те же цвета, что в админке: идёт, получилось, не получилось. */
[data-state="pending"].aimodelka-storefront__status {
	opacity: 0.75;
}

[data-state="ok"].aimodelka-storefront__status {
	color: #007017;
}

[data-state="error"].aimodelka-storefront__status {
	color: #b32d2e;
}
