/**
 * ACH Authorization form — supplemental styles.
 *
 * Extends onboarding-register.css with ACH-specific layout.
 *
 * @package Lonestar
 */

/* ── Page background: extend gray to fill viewport ── */
body:has(.lonestar-ach) {
	background: #f6f8fb;
}

/* ── Override wizard step-reveal: ACH is a single-page form ── */
.lonestar-ach .lonestar-register-section {
	opacity: 1;
	transform: none;
}

/* ── Override wizard success button disabled state: ACH has a real download link ── */
.lonestar-ach .lonestar-register-success .button,
.lonestar-ach .lonestar-register-success .button.alt {
	pointer-events: auto;
	cursor: pointer;
}

/* ── Success action buttons row ── */
.lonestar-ach-success-actions {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
	margin-top: 6px;
}

.lonestar-ach .lonestar-btn-checkout {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: #16a34a;
	border-color: #15803d;
	color: #fff;
	font-weight: 700;
	font-size: 15px;
	padding: 10px 22px;
	border-radius: 8px;
	text-decoration: none;
	transition: background 0.15s ease;
}

.lonestar-ach .lonestar-btn-checkout:hover {
	background: #15803d;
	color: #fff;
}

/* ── Notices ── */
.lonestar-ach-notice {
	padding: 14px 16px;
	border-radius: 10px;
	margin-bottom: 18px;
	font-size: 14px;
	line-height: 1.45;
}

.lonestar-ach-notice p {
	margin: 0;
}

.lonestar-ach-notice--error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.lonestar-ach-notice--info {
	background: #eff6ff;
	border: 1px solid #bfdbfe;
	color: #1e40af;
}

.lonestar-ach-notice--warning {
	background: #fefce8;
	border: 1px solid #e5d68a;
	color: #374151;
	padding: 20px 22px;
}

.lonestar-ach-notice--warning > p:first-child strong {
	color: #92400e;
}

/* ── Management gate ── */
.lonestar-ach-manage-gate {
	margin-top: 18px;
	padding: 18px 20px;
	border: 1px solid #d1d5db;
	border-radius: 8px;
	background: #f9fafb;
}

.lonestar-ach-manage-gate .lonestar-attestation-item {
	margin-bottom: 16px;
	color: #1f2937;
}

.lonestar-ach .lonestar-ach-replace-btn.button.alt {
	width: 100%;
	min-height: 50px;
	font-size: 15px;
	font-weight: 700;
	background: #b91c1c;
	border-color: #991b1b;
	color: #fff;
	border-radius: 8px;
	transition: opacity 0.15s ease;
}

.lonestar-ach .lonestar-ach-replace-btn.button.alt:disabled {
	opacity: 0.35;
	cursor: not-allowed;
	background: #b91c1c;
	color: #fff;
}

.lonestar-ach .lonestar-ach-replace-btn.button.alt:not(:disabled):hover {
	background: #991b1b;
}

/* ── Existing auth header: text left, download right ── */
.lonestar-ach-existing-header {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 16px;
}

.lonestar-ach-existing-details {
	flex: 1;
	min-width: 0;
}

.lonestar-ach-download-link {
	flex-shrink: 0;
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 14px;
	border: 1px solid #d1cbbe;
	border-radius: 6px;
	background: #fff;
	color: #78600a;
	font-size: 13px;
	font-weight: 600;
	line-height: 1;
	white-space: nowrap;
	text-decoration: none;
	transition: border-color 0.15s ease, background 0.15s ease;
}

.lonestar-ach-download-link:hover {
	border-color: #92400e;
	background: #fef9ee;
	color: #78600a;
}

.lonestar-ach-download-link svg {
	flex-shrink: 0;
}

@media (max-width: 600px) {
	.lonestar-ach-existing-header {
		flex-direction: column;
	}
}

/* ── 3-col grid: name spans left, email + phone on right ── */
.lonestar-ach .lonestar-register-section:first-of-type .lonestar-register-grid {
	grid-template-columns: 1fr 1fr;
}

.lonestar-ach .lonestar-register-section:first-of-type .lonestar-register-grid .form-row:first-child {
	grid-column: 1 / -1;
}

/* ── Bank section: routing + account in 2-col, confirm full-width ── */
.lonestar-ach .lonestar-register-section:nth-of-type(2) .lonestar-register-grid {
	grid-template-columns: 1fr 1fr;
}

/* ── Authorization Terms ── */
.lonestar-ach-terms {
	padding: 16px 18px 16px 22px;
	border: 1px solid #d9e1ee;
	border-radius: 10px;
	background: #fff;
}

.lonestar-ach-terms ol {
	margin: 0;
	padding-left: 18px;
	list-style: decimal;
}

.lonestar-ach-terms li {
	margin-bottom: 10px;
	font-size: 13.5px;
	line-height: 1.55;
	color: #374151;
}

.lonestar-ach-terms li:last-child {
	margin-bottom: 0;
}

/* ── Read-only email field dimmed ── */
.lonestar-ach input[readonly] {
	background: #f1f5f9;
	color: #64748b;
	cursor: default;
}

/* ── Confirm account number mismatch ── */
.lonestar-ach-mismatch {
	border-color: #b45309 !important;
	background: #fff7ed !important;
	box-shadow: 0 0 0 3px rgba(180, 83, 9, 0.18) !important;
}

.lonestar-ach-mismatch-hint {
	margin: 4px 0 0;
	color: #9a3412;
	font-size: 12px;
	font-weight: 600;
	line-height: 1.35;
}

/* ── Textarea in lonestar-register context ── */
.lonestar-ach textarea {
	width: 100%;
	min-height: 46px;
	padding: 10px 12px;
	border: 1px solid #c6d2e6;
	border-radius: 9px;
	background: #fff;
	color: #111827;
	font-size: 14px;
	font-family: inherit;
	resize: vertical;
}

.lonestar-ach textarea:focus {
	outline: 0;
	border-color: #5f7fbf;
	box-shadow: 0 0 0 3px rgba(30, 63, 137, 0.2);
}

/* ── Mobile ── */
@media (max-width: 600px) {
	.lonestar-ach .lonestar-register-section:first-of-type .lonestar-register-grid,
	.lonestar-ach .lonestar-register-section:nth-of-type(2) .lonestar-register-grid {
		grid-template-columns: 1fr;
	}

	.lonestar-ach .lonestar-register-section:first-of-type .lonestar-register-grid .form-row:first-child {
		grid-column: auto;
	}
}
