/* ==========================================================================
   Meter Pricing – Input Widget
   Uses CSS custom properties so it inherits your theme's design tokens.
   ========================================================================== */

.mp-meter-wrapper {
	display: flex;
	flex-direction: column;
	gap: 6px;
	font-size: inherit;
	font-family: inherit;
}

/* Label row --------------------------------------------------------------- */
.mp-label-row {
	display: flex;
	align-items: baseline;
	justify-content: space-between;
	gap: 8px;
}

.mp-label {
	font-weight: 600;
	font-size: 0.95em;
}

.mp-hint {
	font-size: 0.82em;
	color: #888;
	white-space: nowrap;
}

/* Input row --------------------------------------------------------------- */
.mp-input-row {
	display: flex;
	align-items: center;
	gap: 0;
	border: 1px solid #d0d0d0;
	border-radius: 4px;
	overflow: hidden;
	width: fit-content;
	min-width: 160px;
}

.mp-btn {
	background: #f5f5f5;
	border: none;
	border-radius: 0;
	color: #333;
	cursor: pointer;
	font-size: 1.3em;
	font-weight: 400;
	line-height: 1;
	padding: 0;
	width: 40px;
	height: 44px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.15s;
	flex-shrink: 0;
	-webkit-user-select: none;
	user-select: none;
}

.mp-btn:hover {
	background: #e8e8e8;
}

.mp-btn:active {
	background: #ddd;
}

.mp-btn--decrease {
	border-right: 1px solid #d0d0d0;
}

.mp-btn--increase {
	border-left: 1px solid #d0d0d0;
}

.mp-input {
	-moz-appearance: textfield;
	appearance: textfield;
	background: #fff;
	border: none;
	border-radius: 0;
	box-shadow: none;
	font-size: 1em;
	font-family: inherit;
	height: 44px;
	outline: none;
	padding: 0 8px;
	text-align: center;
	width: 90px;
}

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

.mp-input:focus {
	background: #fafeff;
}

/* Error message ----------------------------------------------------------- */
.mp-error {
	color: #c0392b;
	font-size: 0.82em;
	min-height: 1.2em;
	display: none;
}

.mp-error--visible {
	display: block;
}

/* Total price display ----------------------------------------------------- */
.mp-total {
	display: flex;
	align-items: center;
	gap: 8px;
	margin-top: 2px;
	padding: 8px 12px;
	background: #f8f8f8;
	border-radius: 4px;
	border: 1px solid #ebebeb;
}

.mp-total__label {
	font-size: 0.88em;
	color: #666;
}

.mp-total__value {
	font-size: 1.1em;
	font-weight: 700;
	color: #111;
}

/* Responsive --------------------------------------------------------------- */
@media ( max-width: 480px ) {
	.mp-input-row {
		min-width: 140px;
	}

	.mp-input {
		width: 70px;
	}
}
