/* Herecraft MultiVendorX vendor product custom fields
 * Match dashboard cards / ACF field layout (label above, full-width input).
 */

.hc-mvx-card {
	display: block;
	width: 100%;
	box-sizing: border-box;
	background: #fff;
	border: 1px solid #e6e8ec;
	border-radius: 10px;
	margin: 0 0 1.25rem;
	overflow: visible;
	box-shadow: 0 1px 2px rgba(16, 24, 40, 0.04);
}

.hc-mvx-card__header {
	display: block !important;
	visibility: visible !important;
	padding: 1rem 1.25rem;
	border-bottom: 1px solid #eef0f3;
	background: #fafbfc;
	border-radius: 10px 10px 0 0;
}

.hc-mvx-card__title {
	display: block !important;
	margin: 0;
	padding: 0;
	font-size: 0.95rem;
	font-weight: 600;
	line-height: 1.45;
	color: #1f2937;
}

.hc-mvx-card__desc {
	margin: 0.35rem 0 0;
	padding: 0;
	font-size: 0.75rem;
	line-height: 1.45;
	color: #6b7280;
	font-weight: 400;
}

.hc-mvx-card__body {
	display: block;
	padding: 1.35rem 1.25rem 1.4rem;
	background: #fff;
	border-radius: 0 0 10px 10px;
	overflow: visible;
}

.hc-mvx-card__body > .hc-mvx-field:first-child {
	margin-top: 0;
	padding-top: 0.15rem;
}

.hc-mvx-field {
	display: block;
	width: 100%;
	box-sizing: border-box;
	margin: 0 0 1.15rem;
	overflow: visible;
	scroll-margin-top: 1.5rem;
}

.hc-mvx-field:last-child {
	margin-bottom: 0;
}

.hc-mvx-field__label {
	display: block !important;
	position: static !important;
	width: 100%;
	height: auto !important;
	margin: 0 0 0.5rem;
	padding: 0.1rem 0 0;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.5;
	color: #374151;
	overflow: visible !important;
	clip: auto !important;
	clip-path: none !important;
	white-space: normal;
}

.hc-mvx-field__required {
	color: #dc2626;
	font-weight: 700;
}

.hc-mvx-field--required .hc-mvx-field__select.is-required-empty {
	border-color: #fca5a5;
}

.hc-mvx-field__input,
.hc-mvx-field__textarea,
.hc-mvx-field__select,
.hc-mvx-card input[type="text"],
.hc-mvx-card input[type="number"],
.hc-mvx-card textarea,
.hc-mvx-card select {
	display: block;
	width: 100% !important;
	max-width: 100%;
	box-sizing: border-box;
	margin: 0;
	border: 1px solid #d7dbe3;
	border-radius: 8px;
	padding: 0.625rem 0.75rem;
	min-height: 2.5rem;
	font-size: 0.875rem;
	line-height: 1.4;
	background: #fff;
	color: #111827;
	box-shadow: none;
	appearance: none;
	-webkit-appearance: none;
}

.hc-mvx-field__select {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M1.4 0.6L6 5.2 10.6.6 12 2 6 8 0 2z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 0.75rem center;
	padding-right: 2rem;
	cursor: pointer;
}

.hc-mvx-field__textarea {
	min-height: 6rem;
	resize: vertical;
}

.hc-mvx-image-field__row {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
	align-items: center;
}

.hc-mvx-image-field__preview {
	width: 88px;
	height: 88px;
	object-fit: cover;
	border-radius: 8px;
	border: 1px solid #e6e8ec;
	background: #f8f9fb;
}

.hc-mvx-image-field__placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 88px;
	height: 88px;
	border: 1px dashed #d7dbe3;
	border-radius: 8px;
	background: #f8f9fb;
	color: #6b7280;
	font-size: 0.7rem;
	text-align: center;
	padding: 0.5rem;
	box-sizing: border-box;
}

.hc-mvx-image-field__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	align-items: center;
}

.hc-mvx-field__input:focus,
.hc-mvx-field__textarea:focus,
.hc-mvx-field__select:focus,
.hc-mvx-card input[type="text"]:focus,
.hc-mvx-card input[type="number"]:focus,
.hc-mvx-card textarea:focus,
.hc-mvx-card select:focus {
	outline: none;
	border-color: #9aa3b2;
	box-shadow: 0 0 0 3px rgba(154, 163, 178, 0.2);
}

.hc-mvx-field__help {
	display: block;
	margin: 0.4rem 0 0;
	padding: 0;
	font-size: 0.75rem;
	line-height: 1.4;
	color: #6b7280;
}

.hc-mvx-radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 0.85rem 1.5rem;
	align-items: center;
	margin-top: 0.35rem;
	padding: 0.15rem 0;
}

/* Keep Product Data Extras / GST block clear of Recommended checklist overlap. */
#multivendorx-store-dashboard .hc-mvx-card,
#store-dashboard .hc-mvx-card {
	position: relative;
	z-index: 1;
}

#multivendorx-store-dashboard .hc-mvx-card + .hc-mvx-card,
#store-dashboard .hc-mvx-card + .hc-mvx-card {
	margin-top: 0.25rem;
}

.hc-mvx-radio,
.hc-mvx-checkbox {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.3;
	color: #374151;
	cursor: pointer;
	user-select: none;
}

.hc-mvx-radio input,
.hc-mvx-checkbox input {
	width: auto !important;
	min-width: 1rem;
	min-height: 1rem;
	margin: 0;
	padding: 0;
	accent-color: #4b5563;
	cursor: pointer;
}

.hc-mvx-checkbox-list {
	display: flex;
	flex-direction: column;
	gap: 0.55rem;
	max-height: 220px;
	overflow: auto;
	padding-right: 0.25rem;
}

.hc-mvx-repeater {
	margin-bottom: 0;
}

.hc-mvx-repeater__rows {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
	margin: 0 0 0.75rem;
}

.hc-mvx-repeater__row {
	display: grid;
	grid-template-columns: 1fr 1fr auto;
	gap: 0.75rem;
	align-items: end;
	padding: 0.75rem;
	border: 1px solid #eef0f3;
	border-radius: 8px;
	background: #f8f9fb;
}

.hc-mvx-repeater__cell {
	display: block;
	min-width: 0;
}

.hc-mvx-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #d7dbe3;
	background: #fff;
	color: #111827;
	border-radius: 8px;
	padding: 0.5rem 0.875rem;
	min-height: 2.25rem;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.2;
	cursor: pointer;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.hc-mvx-btn:hover {
	background: #f3f4f6;
	border-color: #c5cad3;
}

.hc-mvx-btn--link {
	border: none;
	background: transparent;
	color: #b91c1c;
	padding: 0.5rem 0.25rem;
	min-height: auto;
	box-shadow: none;
}

.hc-mvx-btn--link:hover {
	background: transparent;
	text-decoration: underline;
}

@media (max-width: 720px) {
	.hc-mvx-repeater__row {
		grid-template-columns: 1fr;
		align-items: stretch;
	}

	.hc-mvx-btn--link {
		justify-content: flex-start;
	}
}

/* Hide checkout address-book popups if they still render on the dashboard. */
body.multivendorx-dashboard #dsabafw_billing_popup,
body.multivendorx-dashboard #dsabafw_shipping_popup,
body.multivendorx-dashboard .address_selection_popup_main,
body.multivendorx-dashboard .shipping_address_selection_popup_main,
#multivendorx-store-dashboard ~ #dsabafw_billing_popup,
#multivendorx-store-dashboard ~ #dsabafw_shipping_popup,
#multivendorx-store-dashboard ~ .address_selection_popup_main,
#multivendorx-store-dashboard ~ .shipping_address_selection_popup_main,
.admin-main-wrapper ~ #dsabafw_billing_popup,
.admin-main-wrapper ~ #dsabafw_shipping_popup,
.admin-main-wrapper ~ .address_selection_popup_main,
.admin-main-wrapper ~ .shipping_address_selection_popup_main {
	display: none !important;
	visibility: hidden !important;
	height: 0 !important;
	overflow: hidden !important;
	pointer-events: none !important;
}

/* Vendor product save — fixed themed notice (below nav, never under header) */
.hc-mvx-notice-host {
	position: fixed;
	z-index: 100080;
	pointer-events: none;
	display: flex;
	justify-content: stretch;
}

.hc-mvx-default-notice {
	--hc-notice-accent: #754c24;
	--hc-notice-accent-dark: #5e3b19;
	--hc-notice-bg: #fffaf5;
	--hc-notice-border: #e8d2b8;
	--hc-notice-text: #3f2a14;

	pointer-events: auto;
	display: flex;
	align-items: center;
	gap: 0.85rem;
	width: 100%;
	max-width: 720px;
	margin: 0 auto;
	padding: 0.95rem 1.1rem;
	border: 1px solid var(--hc-notice-border);
	border-left: 4px solid var(--hc-notice-accent);
	border-radius: 12px;
	background: var(--hc-notice-bg);
	box-shadow: 0 10px 28px rgba(63, 42, 20, 0.14);
	box-sizing: border-box;
	animation: hc-mvx-notice-in 0.22s ease;
}

.hc-mvx-default-notice--error {
	--hc-notice-accent: #754c24;
	--hc-notice-accent-dark: #5e3b19;
	--hc-notice-bg: #fffaf5;
	--hc-notice-border: #e8d2b8;
	--hc-notice-text: #3f2a14;
}

.hc-mvx-default-notice--success {
	--hc-notice-accent: #2f6b3a;
	--hc-notice-accent-dark: #245530;
	--hc-notice-bg: #f3faf4;
	--hc-notice-border: #b7dbc0;
	--hc-notice-text: #1f3d26;
}

.hc-mvx-default-notice__icon {
	flex-shrink: 0;
	width: 2rem;
	height: 2rem;
	border-radius: 999px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--hc-notice-accent);
	color: #fff;
	font-size: 0.85rem;
	font-weight: 700;
	line-height: 1;
}

.hc-mvx-default-notice__content {
	display: flex;
	flex-direction: column;
	gap: 0.2rem;
	flex: 1;
	min-width: 0;
}

.hc-mvx-default-notice__title {
	display: block;
	font-size: 0.9375rem;
	font-weight: 700;
	line-height: 1.3;
	color: var(--hc-notice-text);
}

.hc-mvx-default-notice__text {
	display: block;
	font-size: 0.8125rem;
	font-weight: 500;
	line-height: 1.45;
	color: var(--hc-notice-text);
	opacity: 0.92;
	white-space: normal;
	overflow-wrap: anywhere;
}

.hc-mvx-default-notice__dismiss {
	flex-shrink: 0;
	width: 1.75rem;
	height: 1.75rem;
	border: 0;
	margin: 0;
	padding: 0;
	border-radius: 999px;
	background: rgba(117, 76, 36, 0.08);
	color: var(--hc-notice-accent-dark);
	font-size: 1.15rem;
	line-height: 1;
	cursor: pointer;
}

.hc-mvx-default-notice--success .hc-mvx-default-notice__dismiss {
	background: rgba(47, 107, 58, 0.1);
}

.hc-mvx-default-notice__dismiss:hover {
	background: rgba(117, 76, 36, 0.16);
}

.hc-mvx-btn-spinner {
	display: none;
	width: 14px;
	height: 14px;
	margin-right: 0.5rem;
	border: 2px solid rgba(255, 255, 255, 0.35);
	border-top-color: #ffffff;
	border-radius: 50%;
	vertical-align: middle;
	flex-shrink: 0;
	animation: hc-mvx-spin 0.7s linear infinite;
}

.hc-mvx-is-saving .hc-mvx-btn-spinner,
button.hc-mvx-is-saving .hc-mvx-btn-spinner {
	display: inline-block;
}

body.hc-mvx-product-saving .adminfont-save,
.hc-mvx-is-saving .adminfont-save {
	opacity: 0.35;
}

button.hc-mvx-is-saving,
.hc-mvx-is-saving {
	opacity: 0.9;
	cursor: wait !important;
	pointer-events: none;
	position: relative;
}

@keyframes hc-mvx-notice-in {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@keyframes hc-mvx-spin {
	to {
		transform: rotate(360deg);
	}
}

@media (max-width: 900px) {
	.hc-mvx-notice-host {
		left: 12px !important;
		right: 12px !important;
	}
}

/* ------------------------------------------------------------------
 * Upload image card — Features Image + Product gallery
 * MVX FileInputUI (.file-uploader / .uploaded-image) ships without
 * containment styles, so gallery thumbs overflow the right sidebar.
 * ------------------------------------------------------------------ */
#multivendorx-store-dashboard .file-uploader,
#store-dashboard .file-uploader,
.admin-main-wrapper .file-uploader {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 100% !important;
	max-width: 100%;
	min-height: 10rem;
	margin: 0 0 0.75rem;
	padding: 1rem;
	border: 1.5px dashed #c9ced6;
	border-radius: 10px;
	background-color: #f8f9fb;
	background-size: contain !important;
	background-position: center center !important;
	background-repeat: no-repeat !important;
	overflow: hidden;
	text-align: center;
}

#multivendorx-store-dashboard .file-uploader .title,
#store-dashboard .file-uploader .title,
.admin-main-wrapper .file-uploader .title {
	display: block;
	margin: 0.35rem 0;
	font-size: 0.8125rem;
	color: #6b7280;
}

#multivendorx-store-dashboard .file-uploader .overlay,
#store-dashboard .file-uploader .overlay,
.admin-main-wrapper .file-uploader .overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	background: rgba(17, 24, 39, 0.45);
	opacity: 0;
	transition: opacity 0.15s ease;
	border-radius: 10px;
}

#multivendorx-store-dashboard .file-uploader:hover .overlay,
#store-dashboard .file-uploader:hover .overlay,
.admin-main-wrapper .file-uploader:hover .overlay {
	opacity: 1;
}

#multivendorx-store-dashboard .file-uploader .button-wrapper,
#store-dashboard .file-uploader .button-wrapper,
.admin-main-wrapper .file-uploader .button-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	justify-content: center;
}

#multivendorx-store-dashboard .uploaded-image,
#store-dashboard .uploaded-image,
.admin-main-wrapper .uploaded-image {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 0.5rem;
	align-items: flex-start;
	box-sizing: border-box;
	width: 100% !important;
	max-width: 100% !important;
	margin: 0.25rem 0 0;
	padding: 0;
	overflow: hidden;
}

#multivendorx-store-dashboard .uploaded-image .image,
#store-dashboard .uploaded-image .image,
.admin-main-wrapper .uploaded-image .image {
	position: relative;
	flex: 0 0 auto;
	box-sizing: border-box;
	width: 4.25rem;
	height: 4.25rem;
	max-width: calc(33.333% - 0.35rem);
	margin: 0;
	padding: 0;
	border: 1px solid #e6e8ec;
	border-radius: 8px;
	overflow: hidden;
	background: #fff;
	cursor: pointer;
}

#multivendorx-store-dashboard .uploaded-image .image.active,
#store-dashboard .uploaded-image .image.active,
.admin-main-wrapper .uploaded-image .image.active {
	border-color: #754c24;
	box-shadow: 0 0 0 2px rgba(117, 76, 36, 0.25);
}

#multivendorx-store-dashboard .uploaded-image .image img,
#store-dashboard .uploaded-image .image img,
.admin-main-wrapper .uploaded-image .image img {
	display: block;
	width: 100% !important;
	height: 100% !important;
	max-width: 100%;
	object-fit: cover;
}

#multivendorx-store-dashboard .uploaded-image .image .close-btn,
#store-dashboard .uploaded-image .image .close-btn,
.admin-main-wrapper .uploaded-image .image .close-btn {
	position: absolute;
	top: 2px;
	right: 2px;
	z-index: 2;
	width: 1.1rem;
	height: 1.1rem;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border-radius: 999px;
	background: rgba(17, 24, 39, 0.72);
	color: #fff;
	font-size: 0.65rem;
	line-height: 1;
	cursor: pointer;
}

/* Keep Upload image / right-column cards from forcing page-wide scroll. */
#multivendorx-store-dashboard .admin-panel .card,
#store-dashboard .admin-panel .card,
#multivendorx-store-dashboard [class*="right"] .card,
#store-dashboard [class*="right"] .card {
	max-width: 100%;
	overflow-x: hidden;
	box-sizing: border-box;
}

#multivendorx-store-dashboard .form-group,
#store-dashboard .form-group {
	max-width: 100%;
	overflow: hidden;
	box-sizing: border-box;
}
