/* =========================================================
   AUTONEER ORDERS – BUTTON SYSTEM
   .au-btn base + variants. Anchors and buttons share the
   same classes so links can look like actions where the
   markup is genuinely navigational.
   ========================================================= */

.au-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 8px 16px;
	min-height: 38px;
	font-size: var(--au-font-size);
	font-weight: 500;
	font-family: inherit;
	line-height: 1.2;
	border: 1px solid transparent;
	border-radius: var(--au-radius-sm);
	cursor: pointer;
	text-decoration: none;
	transition: background-color 0.15s ease, box-shadow 0.15s ease;
	white-space: nowrap;
}

.au-btn:hover {
	text-decoration: none;
}

.au-btn:focus-visible {
	outline: none;
	box-shadow: var(--au-focus-ring);
}

.au-btn:disabled,
.au-btn.disabled {
	opacity: 0.55;
	cursor: not-allowed;
	pointer-events: none;
}

/* Primary action: dark slate (brand) */
.au-btn--primary {
	background: var(--au-nav-active-gradient);
	color: var(--au-text-on-dark);
	border-color: var(--au-slate-dark);
}

.au-btn--primary:hover,
.au-btn--primary:focus-visible {
	background: var(--au-slate-dark);
	color: var(--au-text-on-dark);
}

/* Accent action: AUTONEER green */
.au-btn--accent {
	background: var(--au-accent);
	color: var(--au-text-on-dark);
	border-color: var(--au-accent);
}

.au-btn--accent:hover,
.au-btn--accent:focus-visible {
	background: #0D4F21;
	color: var(--au-text-on-dark);
}

/* Secondary action: outlined on white */
.au-btn--secondary {
	background: var(--au-surface);
	color: var(--au-slate);
	border-color: gray;
	box-shadow: inset 0 -2px 3px rgba(0, 0, 0, 0.06);
}

.au-btn--secondary:hover,
.au-btn--secondary:focus-visible {
	background: darkslategray;
	color: white;
	border-color: white;
}

/* Destructive action */
.au-btn--danger {
	background: var(--au-danger);
	color: var(--au-text-on-dark);
	border-color: var(--au-danger);
}

.au-btn--danger:hover,
.au-btn--danger:focus-visible {
	background: #7F0E2E;
	color: var(--au-text-on-dark);
}

/* Dismiss action: neutral gray with a white icon, used for the Close
   button that sits with the other actions in the order modals */
.au-btn--close {
	background: #6C757D;
	color: var(--au-text-on-dark);
	border-color: #6C757D;
}

.au-btn--close:hover,
.au-btn--close:focus-visible {
	background: #5A6268;
	color: var(--au-text-on-dark);
}

.au-btn--close .bi {
	color: var(--au-text-on-dark);
}

/* Full-width (auth primary actions) */
.au-btn--block {
	display: flex;
	width: 100%;
}

/* Compact button for table rows / toolbars */
.au-btn--sm {
	padding: 3px 10px;
	min-height: 28px;
	font-size: var(--au-font-size-sm);
}

/* Icon-only action (must carry aria-label in markup) */
.au-btn--icon {
	padding: 6px;
	min-width: 38px;
}

/* Loading state: set aria-busy="true" and .is-loading in JS */
.au-btn.is-loading {
	pointer-events: none;
	opacity: 0.75;
}

.au-btn.is-loading::before {
	content: "";
	width: 14px;
	height: 14px;
	border: 2px solid currentColor;
	border-left-color: transparent;
	border-radius: 50%;
	animation: au-btn-spin 0.6s linear infinite;
}

@keyframes au-btn-spin {
	to {
		transform: rotate(360deg);
	}
}