/**
 * Kreativdekor Variations Table — XStore (8theme) styling.
 *
 * Loaded only when XStore is the active theme, and only while the "Theme
 * compatibility styles" setting is on, so it can be switched off from the
 * settings screen without touching any files.
 *
 * Everything here is cosmetic: it borrows XStore's own custom properties where
 * they exist and falls back to the plugin's defaults where they do not.
 */

.kd-vt {
	--kd-vt-accent: var(--et_main-color, currentColor);
	--kd-vt-border: var(--et_border-color, #e2e2e2);
	--kd-vt-border-strong: var(--et_dark-grey-color, #c9c9c9);
	--kd-vt-muted: var(--et_grey-color, #6d6d6d);
	--kd-vt-font-size: 1em;

	/* XStore renders at a full 1em here, so claw the width back from the padding. */
	--kd-vt-cell-padding-x: 0.5rem;
}

/* XStore sets a large line-height on tables inside the product summary. */
.kd-vt .kd-vt__table th,
.kd-vt .kd-vt__table td {
	line-height: 1.45;
}

/* Match the theme's own form controls rather than the browser defaults. */
.kd-vt .kd-vt__qty,
.kd-vt .kd-vt__search {
	border: 1px solid var(--kd-vt-border-strong);
	border-radius: var(--et_border-radius, var(--kd-vt-radius));
	font: inherit;
	padding: 0.5em 0.6em;
}

.kd-vt .kd-vt__submit {
	border-radius: var(--et_border-radius, var(--kd-vt-radius));
	font-weight: 600;
}

/*
 * XStore styles the add-to-cart form as a flex container, which would squeeze
 * the table into its own content width; the base stylesheet forces it back to
 * a block. Nothing extra is needed here - and a `max-width` on the table would
 * only out-specify the phone-width cap in the base stylesheet, so do not add
 * one back.
 */

/*
 * XStore's quick view renders the product form inside a lightbox with its own
 * padding scale; drop ours so the table does not float in the middle of it.
 */
.et-quick-view .kd-vt,
.mfp-content .kd-vt {
	margin-block: 0;
}
