/* Allstar Onsite Order Form — iPad-first styling */

.aof-wrap {
	max-width: 900px;
	margin: 0 auto;
	color: #1a1a1a;
	-webkit-text-size-adjust: 100%;
}

.aof-card {
	background: #fff;
	border: 1px solid #e2e6ee;
	border-radius: 12px;
	padding: 18px 18px 20px;
	margin: 0 0 18px;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.aof-card h2 {
	margin: 0 0 14px;
	font-size: 18px;
	color: #123484;
	border-bottom: 2px solid #123484;
	padding-bottom: 8px;
}

.aof-field {
	display: block;
	margin: 0 0 14px;
	position: relative;
}

.aof-field > span {
	display: block;
	font-weight: 600;
	font-size: 14px;
	margin-bottom: 6px;
}

.aof-field input,
.aof-wrap input[type="text"],
.aof-wrap input[type="tel"],
.aof-wrap input[type="email"],
.aof-wrap input[type="date"],
.aof-wrap input[type="number"] {
	width: 100%;
	box-sizing: border-box;
	font-size: 17px;               /* >=16px stops iOS zoom-on-focus */
	padding: 12px 12px;
	border: 1px solid #c7ccd8;
	border-radius: 8px;
	background: #fff;
	-webkit-appearance: none;
	appearance: none;
}

.aof-field input:focus {
	outline: none;
	border-color: #123484;
	box-shadow: 0 0 0 3px rgba(18, 52, 132, 0.15);
}

.aof-grid2 {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0 18px;
}

@media (max-width: 640px) {
	.aof-grid2 { grid-template-columns: 1fr; }
}

.aof-hint {
	font-size: 13px;
	color: #667;
	margin: -6px 0 14px;
}

/* Store search results */
.aof-results {
	position: absolute;
	left: 0;
	right: 0;
	top: 100%;
	z-index: 20;
	background: #fff;
	border: 1px solid #c7ccd8;
	border-radius: 0 0 8px 8px;
	max-height: 260px;
	overflow-y: auto;
	display: none;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.aof-results.open { display: block; }

.aof-results button {
	display: block;
	width: 100%;
	text-align: left;
	padding: 13px 14px;
	font-size: 16px;
	color: #1a1a1a;
	background: #fff;
	border: none;
	border-bottom: 1px solid #eef0f5;
	cursor: pointer;
}

.aof-results button:hover,
.aof-results button:focus {
	color: #1a1a1a;
	background: #eef2fb;
}

/* Product tiers */
.aof-tier { margin-bottom: 20px; }

.aof-tier-head {
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: 4px 12px;
	margin-bottom: 6px;
}

.aof-tier-name {
	font-weight: 700;
	font-size: 16px;
	color: #123484;
}

.aof-tier-meta {
	font-size: 13px;
	color: #667;
}

table.aof-products {
	width: 100%;
	border-collapse: collapse;
	font-size: 15px;
}

table.aof-products th,
table.aof-products td {
	border: 1px solid #dfe3ec;
	padding: 8px 10px;
	text-align: left;
}

table.aof-products thead th {
	background: #123484;
	color: #fff;
	font-size: 13px;
	position: sticky;
	top: 0;
}

table.aof-products tbody tr:nth-child(even) { background: #f6f8fc; }

.aof-products .aof-num { text-align: center; width: 64px; }
.aof-products td.aof-code { font-variant-numeric: tabular-nums; color: #445; white-space: nowrap; }

.aof-products input.aof-qty {
	width: 72px;
	text-align: center;
	padding: 10px 6px;
	font-size: 17px;
	font-weight: 600;
}

.aof-products input.aof-qty.has-value {
	border-color: #123484;
	background: #eef2fb;
}

/* Signature */
.aof-sig-wrap {
	border: 2px dashed #b9c0d0;
	border-radius: 10px;
	background: #fff;
	overflow: hidden;
	touch-action: none;
}

canvas.aof-signature {
	display: block;
	width: 100%;
	height: 200px;
	touch-action: none;
	cursor: crosshair;
}

/* Buttons + actions */
.aof-btn {
	display: inline-block;
	font-size: 16px;
	font-weight: 600;
	padding: 12px 20px;
	border-radius: 8px;
	border: 1px solid transparent;
	cursor: pointer;
	text-decoration: none;
	line-height: 1.2;
}

.aof-btn-primary {
	background: #123484;
	color: #fff;
}

.aof-btn-primary:disabled {
	opacity: 0.55;
	cursor: default;
}

.aof-btn-light {
	background: #eef0f5;
	color: #333;
	border-color: #d4d9e4;
	margin-top: 12px;
}

.aof-actions {
	position: sticky;
	bottom: 0;
	background: rgba(255, 255, 255, 0.96);
	backdrop-filter: blur(4px);
	padding: 14px 0;
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	border-top: 1px solid #e2e6ee;
}

.aof-actions .aof-btn-primary {
	font-size: 18px;
	padding: 14px 30px;
	min-width: 190px;
}

.aof-message { font-size: 15px; font-weight: 600; }
.aof-message.error { color: #b3261e; }
.aof-message.success { color: #1a7f37; }
.aof-message a { color: #123484; }

.aof-gate {
	max-width: 520px;
	margin: 30px auto;
	padding: 24px;
	border: 1px solid #e2e6ee;
	border-radius: 12px;
	text-align: center;
}

.aof-busy { opacity: 0.6; pointer-events: none; }
