.vksa-gallery-frame {
	position: relative;
}

.vksa-gallery-label[hidden],
.vksa-gallery-mounted[hidden],
.vksa-gallery-mounted > .vksa-badge,
.vksa-gallery-mounted > .vksa-stock-help-summary {
	display: none !important;
}

.vksa-gallery-mounted {
	--vksa-gallery-surface: var(--vk-surface, #fff);
	--vksa-gallery-ink: var(--vk-ink, #151515);
	--vksa-gallery-border: var(--vk-line, #dce2ec);
	--vksa-gallery-stock: #1d5d42;
	--vksa-gallery-dot: #269366;
	--vksa-gallery-pending: #8a5a17;
	--vksa-gallery-unavailable: #626b78;
	margin: 0;
}

html[data-vk-theme="dark"] .vksa-gallery-mounted {
	--vksa-gallery-surface: var(--vk-surface, #20242d);
	--vksa-gallery-ink: var(--vk-ink, #f3f5fa);
	--vksa-gallery-border: var(--vk-line, #3a4354);
	--vksa-gallery-stock: #a0e9c4;
	--vksa-gallery-dot: #80d9ac;
	--vksa-gallery-pending: #f3ce87;
	--vksa-gallery-unavailable: #bbc4d2;
}

.vksa-gallery-mounted .vksa-gallery-label {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 3px 8px;
	box-sizing: border-box;
	border: 1px solid var(--vksa-gallery-border);
	background: var(--vksa-gallery-surface);
	color: var(--vksa-gallery-ink);
	font-size: 12px;
	font-weight: 550;
	line-height: 1.35;
	overflow-wrap: anywhere;
}

.vksa-gallery-state {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
}

.vksa-status-in-stock .vksa-gallery-state {
	color: var(--vksa-gallery-stock);
}

.vksa-gallery-dot {
	width: 6px;
	height: 6px;
	flex: 0 0 6px;
	border-radius: 50%;
	background: var(--vksa-gallery-dot);
}

:is(.vksa-status-preorder, .vksa-status-estimate) .vksa-gallery-dot {
	background: var(--vksa-gallery-pending);
}

.vksa-status-unavailable .vksa-gallery-dot {
	background: var(--vksa-gallery-unavailable);
}

.vksa-gallery-detail {
	min-width: 0;
	padding-inline-start: 8px;
	border-inline-start: 1px solid var(--vksa-gallery-border);
	font-weight: 700;
}

.vksa-gallery-overlay {
	position: absolute;
	bottom: 16px;
	left: 16px;
	z-index: 4;
	width: max-content;
	max-width: calc(100% - 88px);
	pointer-events: none;
}

.vksa-gallery-overlay .vksa-gallery-label {
	padding: 6px 9px;
	border-radius: var(--vk-radius-sm, 6px);
	background: color-mix(in srgb, var(--vksa-gallery-surface) 96%, transparent);
}

.vksa-gallery-docked #product-images-carousel {
	border-bottom-left-radius: 0;
	border-bottom-right-radius: 0;
}

.vksa-gallery-docked .vksa-gallery-label {
	width: 100%;
	padding: 6px 12px;
	border-top: 0;
	border-radius: 0 0 var(--vk-radius-md, 8px) var(--vk-radius-md, 8px);
}

@media (max-width: 540px) {
	.vksa-gallery-overlay .vksa-gallery-label {
		padding-inline: 7px;
		gap: 3px 6px;
		font-size: 11.5px;
	}
}

.vksa-stock-help-badge {
	position: relative;
}

.vksa-stock-help-summary {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	max-inline-size: 100%;
}

.vksa-gallery-overlay .vksa-stock-help-badge {
	padding-block: 4px;
	pointer-events: auto;
}

.vksa-stock-help-toggle {
	display: none;
}

.vksa-stock-help-ready .vksa-stock-help-toggle {
	display: inline-grid;
	place-items: center;
	flex: 0 0 24px;
	inline-size: 24px;
	min-inline-size: 24px;
	block-size: 24px;
	min-block-size: 24px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: inherit;
	box-shadow: none;
	cursor: pointer;
}

.vksa-stock-help-toggle > span {
	display: grid;
	place-items: center;
	inline-size: 15px;
	block-size: 15px;
	box-sizing: border-box;
	border: 1px solid currentColor;
	border-radius: 50%;
	font: 650 11px/1 sans-serif;
}

.vksa-stock-help-toggle:focus-visible {
	outline: 2px solid currentColor;
	outline-offset: -2px;
}

.vksa-stock-help-message {
	position: absolute;
	z-index: 6;
	inset-inline-start: 0;
	inset-block-end: 100%;
	inline-size: min(17rem, calc(100vw - 48px));
	max-inline-size: none;
	box-sizing: border-box;
	padding: 9px 11px;
	border: 1px solid var(--vk-line, #d9dfeb);
	border-radius: var(--vk-radius-sm, 6px);
	background: var(--vk-surface, #fff);
	color: var(--vk-ink, #20243b);
	box-shadow: 0 4px 14px rgb(0 0 0 / 18%);
	font-size: 12px;
	font-weight: 400;
	line-height: 1.45;
	text-align: start;
	white-space: normal;
}

.vksa-stock-help-message.vksa-stock-help-below {
	inset-block: 100% auto;
}

.vksa-stock-help-message[hidden] {
	display: none !important;
}

html[data-vk-theme="dark"] .vksa-stock-help-message {
	border-color: var(--vk-line, #41495a);
	background: var(--vk-surface, #20242d);
	color: var(--vk-ink, #f3f5fa);
}

html[data-vk-theme="dark"] .vksa-stock-help-summary .vksa-stock-help-toggle {
	color: var(--vk-ink, #f3f5fa);
}

.vksa-gallery-timing {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	min-width: 0;
	max-width: 100%;
}

.vksa-price-anchor {
	position: relative;
}

.vksa-price-docked {
	position: absolute;
	top: var(--vksa-price-top);
	right: var(--vksa-price-right);
	z-index: 2;
	width: max-content;
	max-width: var(--vksa-price-width);
}

.vksa-price-docked[hidden],
.vksa-price-docked > .vksa-badge,
.vksa-price-docked > .vksa-stock-help-summary {
	display: none !important;
}

.vksa-price-docked .vksa-gallery-label {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: flex-end;
	gap: 3px 8px;
	color: var(--vk3-text, light-dark(#252a34, #f3f5fa));
	font-size: 13px;
	font-weight: 550;
	line-height: 1.35;
	text-align: end;
}

.vksa-price-docked :is(.vksa-gallery-state, .vksa-gallery-detail) {
	min-width: 0;
	max-width: 100%;
	overflow-wrap: anywhere;
	hyphens: auto;
}

.vksa-price-docked .vksa-gallery-state {
	align-items: flex-start;
}

.vksa-price-docked .vksa-gallery-dot {
	margin-top: .42em;
	background: currentColor;
}

.vksa-price-docked .vksa-status-in-stock .vksa-gallery-state {
	color: #1e6749;
}

.vksa-price-docked :is(.vksa-status-preorder, .vksa-status-estimate) .vksa-gallery-state {
	color: #8d5615;
}

.vksa-price-docked .vksa-status-unavailable .vksa-gallery-state {
	color: var(--vk3-text-muted, #566172);
}

.vksa-price-docked .vksa-gallery-label:not(.vksa-status-in-stock) .vksa-gallery-dot {
	display: none;
}

.vksa-price-docked .vksa-gallery-detail {
	padding: 0;
	border: 0;
	font-weight: inherit;
}

html[data-vk-theme="dark"] .vksa-price-docked .vksa-status-in-stock .vksa-gallery-state {
	color: #91deba;
}

html[data-vk-theme="dark"] .vksa-price-docked :is(.vksa-status-preorder, .vksa-status-estimate) .vksa-gallery-state {
	color: #f2cc86;
}

html[data-vk-theme="dark"] .vksa-price-docked .vksa-status-unavailable .vksa-gallery-state {
	color: var(--vk3-text-muted, #b4bfce);
}

@media (max-width: 520px) {
	.vksa-price-docked .vksa-gallery-label { font-size: 12px; }
}
