/* AI Studio meta box on the product edit screen. Scoped to the box and its picker. */
.wpbot-studio-metabox .wpbot-studio-mb-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

.wpbot-studio-metabox .wpbot-studio-mb-target {
	margin: 8px 0;
}

.wpbot-studio-metabox .wpbot-studio-mb-target select {
	width: 100%;
}

.wpbot-studio-metabox .wpbot-studio-mb-item {
	display: flex;
	gap: 8px;
	padding: 8px 0;
	border-top: 1px solid #f0f0f1;
}

.wpbot-studio-metabox .wpbot-studio-mb-item img,
.wpbot-studio-metabox .wpbot-studio-mb-item video {
	width: 64px;
	height: 64px;
	object-fit: contain;
	background: #f6f7f7;
	flex: 0 0 64px;
}

.wpbot-studio-metabox .wpbot-studio-mb-info {
	display: flex;
	flex-direction: column;
	gap: 4px;
	min-width: 0;
}

.wpbot-studio-metabox .wpbot-studio-mb-badge {
	font-size: 11px;
	color: #50575e;
}

.wpbot-studio-metabox .wpbot-studio-mb-badge.is-approved {
	color: #00450c;
}

.wpbot-studio-metabox .wpbot-studio-mb-variation {
	font-size: 11px;
	color: #50575e;
}

.wpbot-studio-metabox .wpbot-studio-mb-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
}

.wpbot-studio-metabox .wpbot-studio-mb-toast {
	margin-top: 8px;
	padding: 6px 8px;
	border-left: 4px solid #00a32a;
	background: #f6f7f7;
}

.wpbot-studio-metabox .wpbot-studio-mb-toast.is-error {
	border-left-color: #d63638;
}

.wpbot-studio-metabox [hidden] {
	display: none !important;
}

.wpbot-studio-mb-picker {
	position: fixed;
	inset: 0;
	z-index: 100100;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
}

.wpbot-studio-mb-picker-inner {
	background: #fff;
	width: min(900px, 94vw);
	max-height: 86vh;
	overflow: auto;
	padding: 16px 20px;
	border-radius: 4px;
}

.wpbot-studio-mb-picker-head {
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.wpbot-studio-mb-picker-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
	gap: 10px;
	margin-top: 12px;
}

.wpbot-studio-mb-pick {
	display: flex;
	flex-direction: column;
	gap: 4px;
	border: 1px solid #dcdcde;
	background: #fff;
	padding: 6px;
	cursor: pointer;
	text-align: left;
}

.wpbot-studio-mb-pick:hover,
.wpbot-studio-mb-pick:focus {
	border-color: #2271b1;
}

.wpbot-studio-mb-pick img,
.wpbot-studio-mb-pick video {
	width: 100%;
	aspect-ratio: 1 / 1;
	object-fit: contain;
	background: #f6f7f7;
}

.wpbot-studio-mb-pick span {
	font-size: 12px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.wpbot-studio-metabox .wpbot-studio-mb-size-hint {
	padding: 6px 8px;
	border-left: 3px solid #72aee6;
	background: #f0f6fc;
}

/* Links on the product's own images */
.wpbot-studio-thumb-links {
	margin: 8px 0 0;
}

#product_images_container ul.product_images li.image a.wpbot-studio-ai-edit {
	position: absolute;
	left: 2px;
	bottom: 2px;
	z-index: 2;
	padding: 1px 5px;
	font-size: 11px;
	line-height: 1.6;
	font-weight: 600;
	color: #fff;
	background: #2271b1;
	border-radius: 3px;
	text-decoration: none;
}

#product_images_container ul.product_images li.image a.wpbot-studio-ai-edit:focus {
	box-shadow: 0 0 0 2px #fff, 0 0 0 4px #2271b1;
	outline: 0;
}

.wpbot-studio-variation-links {
	display: block;
	clear: both;
	margin: 4px 0 8px;
	font-size: 12px;
}

#product_images_container ul.product_images li.image {
	position: relative;
}

/* Short tag in display-only content added through wpbot_studio_product_box_after. */
.wpbot-studio-metabox .wpbot-studio-tag {
	display: inline-block;
	margin-left: 4px;
	padding: 0 5px;
	border-radius: 3px;
	font-size: 11px;
	font-weight: 600;
	line-height: 16px;
	background: #f0f6fc;
	color: #2271b1;
}
