/* Branded tracking page (/track/{code}). Used by templates/track/index.html.twig.
 * Mobile-first narrow column (reached primarily from WhatsApp). All classes
 * are track-* prefixed to avoid collisions with homepage's .container, .hero, .pill.
 * Global theme (variables, body, aurora, grain) comes from app.css.
 */

.track-container {
    max-width: 480px;
    margin: 0 auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

.track-hero {
    text-align: center;
    padding: 32px 0;
}

.track-status-icon {
    width: 96px;
    height: 96px;
    margin: 0 auto 20px;
    border-radius: 99px;
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 8px rgba(249, 231, 159, 0.08), 0 16px 48px rgba(249, 231, 159, 0.25);
    position: relative;
}
.track-status-icon::after {
    content: '';
    position: absolute;
    inset: -16px;
    border-radius: 99px;
    border: 1px solid rgba(249, 231, 159, 0.15);
    animation: track-ripple 2.5s ease-out infinite;
}
.track-status-icon svg {
    width: 44px;
    height: 44px;
    stroke: var(--bg);
    stroke-width: 3;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
}
@keyframes track-ripple {
    0%   { transform: scale(1);   opacity: 0.8; }
    100% { transform: scale(1.3); opacity: 0; }
}

.track-hero h1 {
    font-size: 30px;
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
}
.track-hero .track-accent {
    background: linear-gradient(135deg, var(--gold) 0%, var(--gold-dark) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.track-hero p {
    margin: 10px auto 0;
    color: var(--muted);
    font-size: 14px;
    max-width: 320px;
}

.track-meta-pills {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 18px;
}
.track-pill {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid var(--border);
    padding: 6px 14px;
    border-radius: 99px;
    font-size: 12px;
    font-weight: 500;
    color: var(--muted);
}
.track-pill strong { color: var(--gold); font-weight: 700; }

.track-timeline-head {
    margin: 8px 0 16px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--light);
    text-align: center;
}

.track-events {
    list-style: none;
    position: relative;
    padding-left: 0;
    max-width: 360px;
    margin: 0 auto;
}
.track-events::before {
    content: '';
    position: absolute;
    top: 14px;
    bottom: 14px;
    left: 14px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold) 0%, var(--gold-dark) 60%, rgba(212, 172, 13, 0.15) 100%);
    border-radius: 2px;
}

.track-event {
    position: relative;
    padding: 0 0 20px 44px;
}
.track-event:last-child { padding-bottom: 0; }
.track-event::before {
    content: '';
    position: absolute;
    left: 6px;
    top: 6px;
    width: 18px;
    height: 18px;
    border-radius: 99px;
    background: linear-gradient(135deg, var(--gold), var(--gold-dark));
    box-shadow: 0 0 0 4px rgba(249, 231, 159, 0.1);
}
.track-event::after {
    content: '✓';
    position: absolute;
    left: 6px;
    top: 7px;
    width: 18px;
    height: 18px;
    color: var(--bg);
    font-size: 11px;
    font-weight: 800;
    line-height: 18px;
    text-align: center;
}
.track-event.is-current::before {
    box-shadow: 0 0 0 4px rgba(249, 231, 159, 0.2), 0 0 16px rgba(249, 231, 159, 0.6);
}
.track-event .track-event-time {
    font-size: 12px;
    color: var(--muted);
    font-variant-numeric: tabular-nums;
}
.track-event .track-event-status {
    margin-top: 4px;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.4;
}
.track-event.is-current .track-event-status {
    font-weight: 700;
    color: var(--gold);
}

/* Per-status hero icon tint. Default is gold; exception/returned shift toward warning hues. */
.track-status-icon--exception {
    background: linear-gradient(135deg, #FFC371 0%, #E74C3C 100%);
    box-shadow: 0 0 0 8px rgba(231, 76, 60, 0.10), 0 16px 48px rgba(231, 76, 60, 0.25);
}
.track-status-icon--exception::after {
    border-color: rgba(231, 76, 60, 0.18);
}
.track-status-icon--returned {
    background: linear-gradient(135deg, var(--primary-l) 0%, var(--primary) 100%);
    box-shadow: 0 0 0 8px rgba(165, 105, 189, 0.10), 0 16px 48px rgba(108, 52, 131, 0.25);
}
.track-status-icon--returned::after {
    border-color: rgba(165, 105, 189, 0.18);
}
.track-status-icon--returned svg,
.track-status-icon--exception svg {
    stroke: #fff;
}

/* Small modifier for hero icon - used in dev gallery (56px instead of 96px). */
.track-status-icon--sm {
    width: 56px;
    height: 56px;
    margin: 0;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.3);
}
.track-status-icon--sm::after {
    display: none;
}
.track-status-icon--sm svg {
    width: 26px;
    height: 26px;
    stroke-width: 2.5;
}

/* Dev-only gallery of all status icons. Renders only when app.environment == 'dev'. */
.track-status-gallery {
    margin: 40px 0 0;
    padding: 20px 16px;
    border: 1px dashed var(--border-2);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.02);
}
.track-status-gallery__title {
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 16px;
    font-weight: 700;
    text-align: center;
}
.track-status-gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(96px, 1fr));
    gap: 12px;
}
.track-status-gallery__item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 12px 4px;
    border-radius: 12px;
    text-decoration: none;
    transition: background 0.15s, transform 0.15s, border-color 0.15s;
    color: var(--muted);
    border: 1px solid transparent;
}
.track-status-gallery__item:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    transform: translateY(-2px);
}
.track-status-gallery__item.is-active {
    background: rgba(249, 231, 159, 0.08);
    color: var(--gold);
    border-color: rgba(249, 231, 159, 0.2);
}
.track-status-gallery__label {
    font-size: 11px;
    text-align: center;
    font-weight: 500;
    line-height: 1.2;
    font-variant-numeric: tabular-nums;
}
