/* ==========================================================================
   Headwear Priskalkylator — styles
   ========================================================================== */

.hw-kalkylator {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #e0e0e0;
}

.hw-kalk-title {
	font-size: 1.1em;
	font-weight: 600;
	margin: 0 0 16px;
}

/* Price list -------------------------------------------------------------- */

.hw-kalk-pricelist {
	margin-bottom: 16px;
	overflow-x: auto;
}

.hw-pricelist-table {
	border-collapse: collapse;
	font-size: 0.85em;
	white-space: nowrap;
}

.hw-pricelist-table th,
.hw-pricelist-table td {
	padding: 4px 12px;
	text-align: center;
	border: 1px solid #e0e0e0;
}

.hw-pricelist-table th {
	background: #f0f0f0;
	font-weight: 600;
	color: #444;
}

.hw-pricelist-table td {
	background: #fff;
	color: #333;
}

/* Fields ------------------------------------------------------------------- */

.hw-kalk-field {
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 12px;
	flex-wrap: wrap;
}

.hw-kalk-label {
	min-width: 180px;
	font-weight: 500;
	flex-shrink: 0;
}

.hw-min-qty-hint {
	font-weight: 400;
	font-size: 0.85em;
	color: #666;
}

.hw-qty-input,
.hw-method-select,
.hw-colors-select {
	flex: 1;
	min-width: 120px;
	max-width: 260px;
	padding: 6px 10px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 0.95em;
	background: #fff;
}

.hw-qty-input {
	max-width: 120px;
}

/* Hide browser number spinners */
.hw-qty-input::-webkit-outer-spin-button,
.hw-qty-input::-webkit-inner-spin-button {
	-webkit-appearance: none;
}
.hw-qty-input[type="number"] {
	-moz-appearance: textfield;
}

/* Result table ------------------------------------------------------------- */

.hw-kalk-result {
	margin-top: 16px;
	background: #f9f9f9;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 14px 16px;
}

.hw-kalk-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.95em;
}

.hw-kalk-table td {
	padding: 5px 8px;
	vertical-align: middle;
}

.hw-kalk-table .hw-row-label {
	width: 50%;
	color: #444;
}

.hw-kalk-table .hw-row-calc {
	width: 30%;
	color: #666;
	font-size: 0.9em;
}

.hw-kalk-table .hw-row-total {
	width: 20%;
	text-align: right;
	white-space: nowrap;
}

/* Divider row */
.hw-divider-row td {
	padding: 4px 0;
}

.hw-divider-row hr {
	margin: 0;
	border: 0;
	border-top: 1px solid #ddd;
}

/* Grand total row */
.hw-grand-total-row td {
	padding-top: 8px;
	font-size: 1.05em;
}

.hw-grand-total-row .hw-row-total {
	font-size: 1.1em;
}

/* Per-unit row */
.hw-per-unit-row td {
	color: #555;
	font-size: 0.9em;
}

/* Notice below table */
.hw-kalk-notice {
	margin: 10px 0 0;
	font-size: 0.8em;
	color: #888;
}

/* Error message ------------------------------------------------------------ */

.hw-kalk-error {
	margin-top: 8px;
	padding: 8px 12px;
	background: #fff3cd;
	border: 1px solid #ffc107;
	border-radius: 4px;
	color: #856404;
	font-size: 0.9em;
}

/* Responsive --------------------------------------------------------------- */

@media ( max-width: 600px ) {
	.hw-kalk-field {
		flex-direction: column;
		align-items: flex-start;
	}

	.hw-kalk-label {
		min-width: unset;
	}

	.hw-qty-input,
	.hw-method-select,
	.hw-colors-select {
		width: 100%;
		max-width: 100%;
	}

	.hw-kalk-table .hw-row-calc {
		display: none;
	}

	.hw-kalk-table .hw-row-label {
		width: 60%;
	}

	.hw-kalk-table .hw-row-total {
		width: 40%;
	}
}
