/* =========================================================
   Tire Diameter Calculator — tdc-style.css
   ========================================================= */

.tdc-wrap {
	max-width: 640px;
	margin: 0 auto 2em;
	font-family: inherit;
	color: inherit;
}

/* ── Headings ─────────────────────────────────────────────── */
.tdc-heading {
	font-size: 1.25em;
	margin: 0 0 .25em;
}

.tdc-sub {
	margin: 0 0 1.25em;
	font-size: .9em;
	opacity: .75;
}

/* ── Parse row ────────────────────────────────────────────── */
.tdc-parse-row {
	display: flex;
	align-items: center;
	gap: .5em;
	flex-wrap: wrap;
}

.tdc-parse-row label {
	font-weight: 600;
	min-width: 130px;
}

.tdc-parse-row input[type="text"] {
	flex: 1 1 140px;
	padding: .45em .6em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	font-family: monospace;
}

/* ── Divider ──────────────────────────────────────────────── */
.tdc-divider {
	display: flex;
	align-items: center;
	gap: .75em;
	margin: 1.1em 0;
	color: #888;
	font-size: .85em;
}

.tdc-divider::before,
.tdc-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: #ddd;
}

/* ── Manual field grid ────────────────────────────────────── */
.tdc-field-grid {
	display: grid;
	grid-template-columns: repeat( auto-fit, minmax( 140px, 1fr ) );
	gap: .75em 1em;
	margin-bottom: 1em;
}

.tdc-field label {
	display: block;
	font-weight: 600;
	font-size: .875em;
	margin-bottom: .25em;
}

.tdc-unit-label {
	font-weight: 400;
	opacity: .65;
}

.tdc-field input[type="number"] {
	width: 100%;
	padding: .45em .6em;
	border: 1px solid #ccc;
	border-radius: 4px;
	font-size: 1em;
	box-sizing: border-box;
}

/* ── Buttons ──────────────────────────────────────────────── */
.tdc-parse-row button,
#tdc-calc-btn {
	padding: .45em 1em;
	background: #2563eb;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: .95em;
	cursor: pointer;
	white-space: nowrap;
	transition: background .15s;
}

.tdc-parse-row button:hover,
#tdc-calc-btn:hover {
	background: #1d4ed8;
}

#tdc-calc-btn {
	display: block;
	width: 100%;
	margin-top: .25em;
	padding: .65em;
	font-size: 1em;
	font-weight: 600;
}

/* ── Error ────────────────────────────────────────────────── */
.tdc-error {
	margin: .5em 0 0;
	color: #c0392b;
	font-size: .875em;
	min-height: 1.2em;
}

/* ── Results ──────────────────────────────────────────────── */
.tdc-results {
	margin-top: 1.5em;
	border-top: 2px solid #2563eb;
	padding-top: 1em;
}

.tdc-results-heading {
	font-size: 1.05em;
	margin: 0 0 .75em;
}

.tdc-results-heading span {
	font-family: monospace;
	color: #2563eb;
}

.tdc-table {
	width: 100%;
	border-collapse: collapse;
	font-size: .9em;
}

.tdc-table th,
.tdc-table td {
	padding: .5em .65em;
	text-align: left;
	border-bottom: 1px solid #eee;
}

.tdc-table th {
	font-weight: 700;
	background: #f5f7fa;
}

.tdc-table tbody tr:last-child td {
	border-bottom: none;
}

.tdc-table td:nth-child(2),
.tdc-table td:nth-child(3) {
	font-family: monospace;
	white-space: nowrap;
}

/* ── Responsive ───────────────────────────────────────────── */
@media ( max-width: 480px ) {
	.tdc-parse-row label {
		min-width: unset;
		width: 100%;
	}

	.tdc-table th:nth-child(3),
	.tdc-table td:nth-child(3) {
		display: none; /* hide mm column on very small screens */
	}
}
