/* EMI & Lead Checkout - frontend styles (settings ke CSS variables se controlled) */

.emicc-product-emi {
	/* Defaults (Settings page in values ko override karta hai). */
	--emicc-font-size: 15px;
	--emicc-text-color: #333333;
	--emicc-title-color: #222222;
	--emicc-bg: #fafbfc;
	--emicc-border: #e3e6ea;
	--emicc-radius: 10px;
	--emicc-option-bg: #ffffff;
	--emicc-hover-border: #b9c2cc;
	--emicc-accent: #1a7f37;

	margin: 18px 0;
	padding: 16px 18px;
	border: 1px solid var(--emicc-border);
	border-radius: var(--emicc-radius);
	background: var(--emicc-bg);
	color: var(--emicc-text-color);
	font-size: var(--emicc-font-size);
}

.emicc-emi-heading {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 12px;
}

.emicc-emi-title {
	font-weight: 700;
	font-size: 1.05em;
	color: var(--emicc-title-color);
}

.emicc-emi-down {
	font-size: 0.9em;
	color: var(--emicc-text-color);
	background: rgba(0, 0, 0, 0.05);
	padding: 3px 10px;
	border-radius: 999px;
}

.emicc-plan-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 8px;
}

.emicc-plan-option {
	margin: 0;
}

.emicc-plan-option label {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 10px 12px;
	border: 1px solid var(--emicc-border);
	border-radius: calc(var(--emicc-radius) - 2px);
	background: var(--emicc-option-bg);
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.emicc-plan-option label:hover {
	border-color: var(--emicc-hover-border);
}

.emicc-plan-option.emicc-selected label {
	border-color: var(--emicc-accent);
	box-shadow: 0 0 0 1px var(--emicc-accent) inset;
	background: var(--emicc-option-bg);
}

.emicc-plan-option input[type="radio"] {
	margin: 0;
	flex: 0 0 auto;
}

.emicc-plan-option input[type="radio"]:checked + .emicc-plan-name {
	font-weight: 700;
}

.emicc-plan-name {
	flex: 1 1 auto;
}

.emicc-plan-total-col {
	flex: 0 0 auto;
	text-align: center;
	font-size: 0.85em;
	color: var(--emicc-text-color);
	opacity: 0.85;
	white-space: nowrap;
	line-height: 1.3;
}

.emicc-plan-down {
	display: block;
	font-size: 0.9em;
	opacity: 0.85;
}

.emicc-plan-amount {
	flex: 0 0 auto;
	white-space: nowrap;
	color: var(--emicc-accent);
	font-weight: 700;
}

.emicc-emi-note {
	margin: 12px 0 0;
	font-size: 0.82em;
	color: var(--emicc-text-color);
	opacity: 0.7;
	line-height: 1.4;
}

/* ------------------------------------------------------------------ *
 * Mobile / tablet — card-style stacked layout (no cramped columns)
 * ------------------------------------------------------------------ */

@media (max-width: 782px) {
	.emicc-product-emi {
		margin: 14px 0;
		padding: 12px 14px;
		width: 100%;
		max-width: 100%;
		box-sizing: border-box;
	}

	.emicc-emi-heading {
		margin-bottom: 10px;
	}

	.emicc-plan-option label {
		display: block !important;
		position: relative;
		padding: 12px 12px 12px 40px;
		width: 100%;
		box-sizing: border-box;
	}

	.emicc-plan-option input[type="radio"] {
		position: absolute;
		left: 12px;
		top: 14px;
		margin: 0;
		flex: none;
	}

	.emicc-plan-name,
	.emicc-plan-total-col,
	.emicc-plan-amount {
		display: block;
		width: 100%;
		max-width: 100%;
		flex: none !important;
		white-space: normal;
		word-break: normal;
		overflow-wrap: break-word;
	}

	.emicc-plan-name {
		font-weight: 600;
		font-size: 1em;
		line-height: 1.3;
		margin-bottom: 6px;
	}

	.emicc-plan-amount {
		font-size: 1.05em;
		line-height: 1.35;
		margin-bottom: 6px;
		text-align: left;
	}

	.emicc-plan-total-col {
		text-align: left;
		font-size: 0.85em;
		opacity: 0.9;
		line-height: 1.45;
	}

	.emicc-plan-down {
		display: block;
		margin-top: 3px;
	}
}

@media (max-width: 480px) {
	.emicc-product-emi {
		padding: 10px 12px;
	}

	.emicc-plan-option label {
		padding: 10px 10px 10px 36px;
	}

	.emicc-plan-option input[type="radio"] {
		left: 10px;
		top: 12px;
	}

	.emicc-emi-note {
		font-size: 0.78em;
	}
}

/* ------------------------------------------------------------------ *
 * Variable product swatches (Shopify-style buttons)
 * ------------------------------------------------------------------ */

.emicc-variation-control {
	width: 100%;
}

.emicc-variation-swatches {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin: 6px 0 10px;
}

.emicc-swatch {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 52px;
	padding: 8px 14px;
	border: 1px solid var(--emicc-border, #d9dde3);
	border-radius: calc(var(--emicc-radius, 10px) - 4px);
	background: var(--emicc-option-bg, #fff);
	color: var(--emicc-text-color, #333);
	font-size: 0.95em;
	line-height: 1.2;
	cursor: pointer;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, color 0.15s ease;
}

.emicc-swatch:hover {
	border-color: var(--emicc-hover-border, #b9c2cc);
}

.emicc-swatch.selected {
	border-color: var(--emicc-accent, #1a7f37);
	box-shadow: 0 0 0 1px var(--emicc-accent, #1a7f37) inset;
	color: var(--emicc-accent, #1a7f37);
	font-weight: 700;
}

.emicc-variation-select {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.variations_form table.variations td.value {
	display: block;
	width: 100%;
}

.variations_form table.variations tr {
	display: block;
	margin-bottom: 10px;
}

.variations_form table.variations th.label {
	display: block;
	padding-bottom: 4px;
}
