/* ==========================================================================
   Allo Send — tracking page (content/send/tracking.html)
   Loaded after allora.css and send.css. It reuses the Send board, pill, progress,
   timeline and note styles (send.css sections 02 and 12) and only adds what this
   page needs. Behaviour: send-tracking.js.
   ========================================================================== */

/* Lookup band */
.trk-hero { position: relative; isolation: isolate; overflow: hidden; background: var(--ink); padding: clamp(28px, 4vw, 52px) 0 clamp(40px, 6vw, 76px); }
.trk-hero::before { content: ""; position: absolute; inset: 0; z-index: -2; pointer-events: none; background: radial-gradient(44% 70% at 88% 20%, rgba(249, 77, 0, .2), transparent 70%); }
.trk-hero__route { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; fill: rgba(255, 255, 255, .4); opacity: .6; }
.trk-hero .breadcrumb { margin-bottom: 22px; }
.trk-hero .breadcrumb a { display: inline-block; padding-block: 4px; }
.trk-hero .sx-kicker { margin-bottom: 18px; }
.trk-hero__title { font-size: clamp(2.4rem, 5.4vw, 4.2rem); }
.trk-hero .lead { margin-top: 18px; max-width: 560px; }

.trk-form { margin-top: 32px; max-width: 640px; }
.trk-form__label { display: block; margin-bottom: 8px; font-size: 14px; font-weight: 600; color: var(--text-2); }
.trk-form__row { display: flex; gap: 10px; padding: 8px; border-radius: 20px; background: rgba(255, 255, 255, .07); border: 1px solid var(--line-strong); transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease); }
.trk-form__row:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(249, 77, 0, .22); }
.trk-form__input { flex: 1; min-width: 0; height: 56px; padding: 0 16px; border: 0; border-radius: 14px; background: transparent; color: var(--text); font-family: var(--mono); font-size: 19px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.trk-form__input::placeholder { color: var(--text-3); font-weight: 500; letter-spacing: .04em; text-transform: none; }
.trk-form__input:focus { outline: none; }
.trk-form__submit { flex: none; min-height: 56px; padding: 0 26px; border-radius: 14px; font-size: 16.5px; }
.trk-form__submit:disabled { opacity: .7; cursor: progress; }
.trk-form__hint { margin-top: 12px; font-size: 14px; color: var(--text-3); }
.trk-form__message { margin-top: 12px; padding: 12px 16px; border-radius: 14px; background: var(--danger-soft); color: var(--danger); font-size: 15px; font-weight: 600; }

/* Result area */
.trk-result { padding-top: clamp(28px, 4vw, 56px); }
.trk-idle { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); align-items: center; gap: clamp(20px, 4vw, 56px); padding: clamp(20px, 3vw, 36px); border-radius: var(--radius-lg); border: 1px dashed var(--line-strong); }
.trk-idle__art { width: 100%; height: auto; }
.trk-idle p { margin-top: 8px; color: var(--text-2); max-width: 52ch; }

.trk-loading { display: grid; gap: 14px; padding: clamp(20px, 3vw, 36px); border-radius: var(--radius-lg); border: 1px solid var(--line); background: var(--surface); }
.trk-loading__bar { height: 18px; border-radius: 999px; background: linear-gradient(90deg, var(--chip-bg) 0%, var(--line-strong) 50%, var(--chip-bg) 100%); background-size: 200% 100%; animation: trk-shimmer 1.4s linear infinite; }
.trk-loading__bar:nth-child(1) { width: 38%; height: 30px; }
.trk-loading__bar:nth-child(2) { width: 100%; height: 10px; }
.trk-loading__bar:nth-child(3) { width: 64%; }
@keyframes trk-shimmer { to { background-position: -200% 0; } }

.trk-board:focus { outline: none; }
.trk-board:focus-visible { outline: 2.5px solid var(--brand); outline-offset: 4px; }
.trk-board .sx-board__route { margin-top: 10px; }
.trk-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.trk-actions .btn { min-height: 44px; }
.trk-actions .btn:disabled { opacity: .6; cursor: progress; }
.trk-checked { margin-top: 12px; font-size: 13.5px; color: var(--text-3); }
.sx-events .trk-empty { padding-left: 0; color: var(--text-3); font-size: 15px; }
.sx-events .trk-empty::before, .sx-events .trk-empty::after { display: none; }
.trk-notes { margin-top: clamp(28px, 4vw, 48px); }

/* Status legend */
.trk-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 clamp(24px, 4vw, 56px); margin: 0; }
.trk-legend > div { padding: 20px 0; border-top: 1px solid var(--line-strong); }
.trk-legend dt { margin-bottom: 10px; }
.trk-legend dd { margin: 0; font-size: 15px; color: var(--text-2); }

@media (max-width: 960px) {
    .trk-legend { grid-template-columns: 1fr 1fr; }
    .trk-idle { grid-template-columns: minmax(0, 1fr); }
    .trk-idle__art { max-width: 320px; }
}
@media (max-width: 640px) {
    .trk-form__row { flex-direction: column; padding: 8px; }
    .trk-form__input { flex: none; width: 100%; height: 54px; font-size: 18px; }
    .trk-form__submit { width: 100%; }
    .trk-legend { grid-template-columns: 1fr; }
    .trk-actions .btn { flex: 1 1 auto; }
}
