/*!
 * Shree Anjani Courier Tracker
 * Front-end styles for the [shree_anjani_tracker] shortcode.
 *
 * Every colour and radius is a custom property on `.sat`, so a theme can
 * restyle the widget without touching this file:
 *
 *   .sat { --sat-primary: #0b5cab; }
 */

.sat {
	--sat-primary: #f58220;
	--sat-primary-hover: #ff9a45;
	--sat-primary-soft: rgba(245, 130, 32, 0.1);
	--sat-fg: #111827;
	--sat-muted: #6b7280;
	--sat-card: #ffffff;
	--sat-border: rgba(17, 24, 39, 0.08);
	--sat-danger: #dc2626;
	--sat-radius: 4px;
	--sat-gap: 24px;
	--sat-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
	--sat-font: inherit;
	--sat-heading-font: inherit;

	box-sizing: border-box;
	color: var(--sat-fg);
	font-family: var(--sat-font);
	width: 100%;
}

.sat *,
.sat *::before,
.sat *::after {
	box-sizing: inherit;
}

.sat-sr-only {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* -------------------------------------------------------------- Heading */

.sat-title {
	color: var(--sat-fg);
	font-family: var(--sat-heading-font);
	font-size: 30px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0 0 32px;
	text-align: center;
}

@media (max-width: 480px) {
	.sat-title {
		font-size: 24px;
		margin-bottom: 24px;
	}
}

/* ---------------------------------------------------------------- Cards */

.sat-card {
	background: var(--sat-card);
	border: 1px solid var(--sat-border);
	border-left: 4px solid var(--sat-primary);
	border-radius: var(--sat-radius);
	box-shadow: var(--sat-shadow);
	padding: 24px;
}

.sat-card--flush {
	overflow: hidden;
	padding: 0;
}

.sat-card--error {
	border-left-color: var(--sat-danger);
	text-align: center;
}

/* ----------------------------------------------------------- Search form */

.sat-form {
	margin: 0 auto;
	max-width: 28rem;
	width: 100%;
}

.sat-card--form {
	border-left: 1px solid var(--sat-border);
	border-top: 4px solid var(--sat-primary);
}

.sat-form__head {
	margin-bottom: 24px;
	text-align: center;
}

.sat-form__icon {
	align-items: center;
	background: var(--sat-primary-soft);
	border-radius: 999px;
	color: var(--sat-primary);
	display: flex;
	height: 56px;
	justify-content: center;
	margin: 0 auto 12px;
	width: 56px;
}

.sat-form__icon svg {
	height: 28px;
	width: 28px;
}

.sat-form__lead {
	color: var(--sat-muted);
	font-size: 14px;
	line-height: 1.5;
	margin: 0;
}

.sat-input {
	-webkit-appearance: none;
	appearance: none;
	background: var(--sat-card);
	border: 1px solid var(--sat-border);
	border-radius: var(--sat-radius);
	color: var(--sat-fg);
	display: block;
	font-family: inherit;
	font-size: 14px;
	font-variant-numeric: tabular-nums;
	margin-bottom: 16px;
	outline: none;
	padding: 10px 16px;
	transition: border-color 0.15s ease;
	width: 100%;
}

.sat-input::placeholder {
	color: var(--sat-muted);
}

.sat-input:focus {
	border-color: var(--sat-primary);
	box-shadow: 0 0 0 3px var(--sat-primary-soft);
}

.sat-btn {
	align-items: center;
	background: var(--sat-primary);
	border: 0;
	border-radius: var(--sat-radius);
	color: #fff;
	cursor: pointer;
	display: flex;
	font-family: inherit;
	font-size: 14px;
	font-weight: 700;
	gap: 8px;
	justify-content: center;
	letter-spacing: 0.02em;
	line-height: 1.2;
	padding: 14px 16px;
	text-transform: uppercase;
	transition: background-color 0.15s ease, opacity 0.15s ease;
	width: 100%;
}

.sat-btn:hover:not(:disabled),
.sat-btn:focus-visible {
	background: var(--sat-primary-hover);
}

.sat-btn:disabled {
	cursor: not-allowed;
	opacity: 0.5;
}

.sat-btn__icon {
	display: inline-flex;
}

.sat-btn__icon svg {
	height: 16px;
	width: 16px;
}

.sat-btn__spinner {
	animation: sat-spin 0.7s linear infinite;
	border: 2px solid rgba(255, 255, 255, 0.3);
	border-radius: 999px;
	border-top-color: #fff;
	display: none;
	height: 16px;
	width: 16px;
}

/* While loading, the spinner replaces the magnifier + label. */
.sat.is-loading .sat-btn__spinner {
	display: block;
}

.sat.is-loading .sat-btn__icon,
.sat.is-loading .sat-btn__label {
	display: none;
}

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

@media (prefers-reduced-motion: reduce) {
	.sat-btn__spinner {
		animation-duration: 2s;
	}
}

/* ------------------------------------------- Loading (bound-form mode) */

/*
 * Shown in the results area while a lookup runs, for the case where the
 * widget drives a theme's own search controls and has no spinner on screen.
 */
.sat-loading {
	align-items: center;
	color: var(--sat-muted);
	display: flex;
	font-size: 14px;
	gap: 12px;
	margin: 32px auto 0;
	max-width: 48rem;
}

.sat-loading__spinner {
	animation: sat-spin 0.7s linear infinite;
	border: 2px solid var(--sat-primary-soft);
	border-radius: 999px;
	border-top-color: var(--sat-primary);
	flex-shrink: 0;
	height: 18px;
	width: 18px;
}

/* A themed submit button we have disabled mid-request. */
.sat-is-loading {
	cursor: wait;
	opacity: 0.6;
}

/* -------------------------------------------------------------- Results */

.sat-results:empty {
	display: none;
}

.sat-result {
	display: grid;
	gap: var(--sat-gap);
	margin: 40px auto 0;
	max-width: 64rem;
}

.sat-results > .sat-card--error {
	margin: 32px auto 0;
	max-width: 48rem;
}

.sat-grid {
	display: grid;
	gap: var(--sat-gap);
	grid-template-columns: 1fr;
}

@media (min-width: 768px) {
	.sat-grid--2 {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.sat-grid--3 {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

.sat-label {
	color: var(--sat-muted);
	font-size: 12px;
	letter-spacing: 0.08em;
	line-height: 1.4;
	margin: 0 0 8px;
	text-transform: uppercase;
}

.sat-label--sm {
	margin-bottom: 4px;
}

.sat-status {
	color: var(--sat-fg);
	font-family: var(--sat-heading-font);
	font-size: 24px;
	font-weight: 700;
	line-height: 1.25;
	margin: 0;
	text-transform: uppercase;
	word-break: break-word;
}

.sat-center {
	color: var(--sat-fg);
	font-family: var(--sat-heading-font);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
	text-transform: uppercase;
	word-break: break-word;
}

.sat-muted {
	color: var(--sat-muted);
	font-size: 14px;
	line-height: 1.5;
	margin: 8px 0 0;
}

.sat-muted--tight {
	margin-top: 4px;
}

.sat-contact {
	margin-top: 16px;
}

.sat-contact .sat-grid,
.sat-card > .sat-contact {
	gap: 16px;
}

.sat-strong {
	font-size: 14px;
	font-weight: 500;
	line-height: 1.5;
	margin: 0;
}

.sat-tel {
	color: inherit;
	text-decoration: none;
	white-space: nowrap;
}

.sat-tel:hover,
.sat-tel:focus-visible {
	color: var(--sat-primary);
	text-decoration: underline;
}

.sat-error {
	color: var(--sat-danger);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.5;
	margin: 0;
}

/* ------------------------------------------------------ Movement history */

.sat-history__toggle {
	align-items: center;
	background: none;
	border: 0;
	color: inherit;
	cursor: pointer;
	display: flex;
	font-family: inherit;
	gap: 16px;
	justify-content: space-between;
	padding: 20px 24px;
	text-align: left;
	width: 100%;
}

.sat-history__toggle:focus-visible {
	outline: 2px solid var(--sat-primary);
	outline-offset: -2px;
}

.sat-history__title .sat-label {
	display: block;
	margin-bottom: 4px;
}

.sat-history__heading {
	color: var(--sat-fg);
	font-family: var(--sat-heading-font);
	font-size: 18px;
	font-weight: 600;
	line-height: 1.3;
}

.sat-history__meta {
	align-items: center;
	display: flex;
	flex-shrink: 0;
	gap: 12px;
}

.sat-history__meta .sat-muted {
	margin: 0;
}

.sat-chevron {
	color: var(--sat-primary);
	display: inline-flex;
	transition: transform 0.2s ease;
}

.sat-chevron svg {
	height: 20px;
	width: 20px;
}

.sat-history__toggle[aria-expanded="true"] .sat-chevron {
	transform: rotate(180deg);
}

.sat-history__body {
	padding: 0 24px 24px;
}

.sat-history__body[hidden] {
	display: none;
}

.sat-timeline {
	border-left: 1px solid var(--sat-border);
	display: grid;
	gap: 20px;
	list-style: none;
	margin: 0 0 0 8px;
	padding: 0 0 0 24px;
}

.sat-step {
	margin: 0;
	position: relative;
}

.sat-step__dot {
	background: var(--sat-primary);
	border-radius: 999px;
	height: 12px;
	left: -30px;
	position: absolute;
	top: 6px;
	width: 12px;
}

.sat-step__title {
	color: var(--sat-fg);
	font-family: var(--sat-heading-font);
	font-size: 16px;
	font-weight: 600;
	line-height: 1.3;
	margin: 0;
}

.sat-step__desc {
	color: var(--sat-muted);
	font-size: 14px;
	line-height: 1.5;
	margin: 4px 0 0;
	overflow-wrap: anywhere;
}

/* ---------------------------------------------------------- Small screens */

@media (max-width: 480px) {
	.sat-card {
		padding: 18px;
	}

	.sat-history__toggle {
		align-items: flex-start;
		flex-direction: column;
		gap: 10px;
		padding: 18px;
	}

	.sat-history__body {
		padding: 0 18px 18px;
	}

	.sat-status {
		font-size: 20px;
	}
}
