/**
 * IO Widget - Calc Field & Result v1.1.2
 */

.io-calc-field-wrap,
.io-calc-result-wrap {
	width: 100%;
	direction: rtl;
	box-sizing: border-box;
}

.io-calc-field-wrap *,
.io-calc-result-wrap * {
	box-sizing: border-box;
}

.io-calc-label {
	display: block;
	font-size: 14px;
	font-weight: 600;
	color: #1A1A2E;
	margin-bottom: 8px;
	line-height: 1.4;
}

.io-calc-var-hint {
	font-weight: 500;
	font-size: 0.9em;
	opacity: 0.55;
	margin-right: 4px;
}

.io-calc-input-row {
	display: flex;
	align-items: center;
	gap: 8px;
	width: 100%;
}

.io-calc-input {
	flex: 1 1 auto;
	width: 100%;
	min-width: 0;
	padding: 10px 14px;
	font-size: 15px;
	line-height: 1.4;
	color: #1A1A2E;
	background: #fff;
	border: 1px solid #D1D5DB;
	border-radius: 8px;
	outline: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	direction: ltr;
	text-align: left;
	appearance: textfield;
	-moz-appearance: textfield;
}

.io-calc-input::-webkit-outer-spin-button,
.io-calc-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
	margin: 0;
}

.io-calc-input:focus {
	border-color: #3B82F6;
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
}

.io-calc-input[type="range"] {
	padding: 0;
	border: none;
	background: transparent;
	box-shadow: none;
	height: 28px;
	cursor: pointer;
	accent-color: #3B82F6;
}

.io-calc-input[type="range"]:focus {
	box-shadow: none;
}

.io-calc-affix {
	flex: 0 0 auto;
	font-size: 13px;
	color: #6B7280;
	white-space: nowrap;
}

.io-calc-range-value {
	margin-top: 6px;
	font-size: 13px;
	color: #6B7280;
	text-align: left;
	direction: ltr;
}

/* ---- Result ---- */
.io-calc-result-label {
	font-size: 13px;
	font-weight: 600;
	color: #6B7280;
	margin-bottom: 6px;
}

.io-calc-result-box {
	display: block;
	padding: 14px 18px;
	background: #F3F4F6;
	border-radius: 10px;
	text-align: right;
	line-height: 1.3;
}

.io-calc-result-value {
	font-size: 22px;
	font-weight: 700;
	color: #1A1A2E;
	direction: ltr;
	unicode-bidi: embed;
	display: inline-block;
	min-width: 1ch;
	transition: opacity 0.15s ease;
}

.io-calc-result-wrap.is-updating .io-calc-result-value {
	opacity: 0.55;
}

.io-calc-result-affix {
	font-size: 14px;
	font-weight: 500;
	color: #6B7280;
	margin: 0 4px;
}

.io-calc-result-formula {
	margin-top: 8px;
	font-size: 12px;
	color: #9CA3AF;
	direction: ltr;
	text-align: left;
	font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.io-calc-result-wrap.is-error .io-calc-result-value {
	color: #9CA3AF;
	font-weight: 500;
}

@media (max-width: 767px) {
	.io-calc-result-value {
		font-size: 18px;
	}
}
