/* ============================================================
   rastreio.css — página de rastreio
   Carregar depois do style.css.
   ============================================================ */

body.pagina-rastreio {
    background: var(--bg, #0b0b0d);
}

.rastreio {
    padding: 8rem 0 4.5rem;
    min-height: 78vh;
}

.rastreio .container {
    max-width: 780px;
}

/* ---------- Topo ---------- */
.rastreio__topo {
    text-align: center;
    margin-bottom: 2.2rem;
}

.rastreio__selo-topo {
    display: inline-block;
    padding: .35rem 1rem;
    border: 1px solid rgba(255, 196, 0, .4);
    border-radius: 50px;
    background: rgba(255, 196, 0, .08);
    color: var(--yellow);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.rastreio__titulo {
    font-family: var(--font-title);
    font-size: clamp(2.4rem, 7vw, 4rem);
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
    color: var(--text);
    margin: 0 0 .8rem;
}
.rastreio__titulo span { color: var(--yellow); }

.rastreio__descricao {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

/* ---------- Formulário ---------- */
.rastreio__form {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius, 14px);
    padding: 1.6rem;
    margin-bottom: 1.5rem;
}

.rastreio__label {
    display: block;
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--yellow);
    margin-bottom: .6rem;
}

.rastreio__linha {
    display: flex;
    gap: .7rem;
}

.rastreio__campo {
    flex: 1 1 auto;
    min-width: 0;
    background: var(--bg);
    border: 1.5px solid var(--line);
    border-radius: 10px;
    padding: .95rem 1.1rem;
    color: var(--text);
    font-family: var(--font-body);
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    transition: border-color .2s, box-shadow .2s;
}

.rastreio__campo::placeholder {
    color: var(--muted);
    font-weight: 400;
    letter-spacing: .5px;
    text-transform: none;
}

.rastreio__campo:focus {
    outline: none;
    border-color: var(--yellow);
    box-shadow: 0 0 0 3px rgba(255, 196, 0, .15);
}

.rastreio__campo[aria-invalid="true"] {
    border-color: #ff6b6b;
    box-shadow: 0 0 0 3px rgba(255, 107, 107, .14);
}

.rastreio__botao {
    flex: 0 0 auto;
    background: var(--yellow);
    color: #111;
    border: 2px solid var(--yellow);
    border-radius: 10px;
    padding: .95rem 2rem;
    font-family: var(--font-body);
    font-size: .92rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    cursor: pointer;
    transition: transform .2s, background .2s;
}
.rastreio__botao:hover {
    background: #fff;
    border-color: #fff;
    transform: translateY(-2px);
}
.rastreio__botao:active { transform: translateY(0); }

.rastreio__erro {
    display: block;
    min-height: 1.1rem;
    margin-top: .5rem;
    font-size: .82rem;
    font-weight: 600;
    color: #ff8a8a;
}

/* ---------- Resultado vazio ---------- */
.rastreio__vazio {
    text-align: center;
    padding: 2.4rem 1rem;
    border: 1.5px dashed var(--line);
    border-radius: var(--radius, 14px);
    color: var(--muted);
}
.rastreio__vazio-icone {
    display: block;
    font-size: 2rem;
    margin-bottom: .6rem;
    opacity: .55;
}
.rastreio__vazio p { margin: 0; font-size: .93rem; }

/* ---------- Carregando ---------- */
.rastreio__carregando {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .7rem;
    padding: 2.4rem 1rem;
    color: var(--muted);
    font-size: .93rem;
}

.rastreio__spinner {
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 196, 0, .25);
    border-top-color: var(--yellow);
    border-radius: 50%;
    animation: girar .7s linear infinite;
}
@keyframes girar { to { transform: rotate(360deg); } }

/* ---------- Avisos ---------- */
.rastreio__aviso {
    border-radius: var(--radius, 14px);
    padding: 1.2rem 1.4rem;
    font-size: .93rem;
    line-height: 1.55;
    border: 1px solid;
}
.rastreio__aviso strong { display: block; margin-bottom: .2rem; }
.rastreio__aviso code {
    background: rgba(255, 255, 255, .08);
    padding: .1rem .35rem;
    border-radius: 4px;
    font-size: .88em;
}
.rastreio__aviso--erro,
.rastreio__aviso--vazio {
    background: rgba(255, 107, 107, .08);
    border-color: rgba(255, 107, 107, .35);
    color: #ffc9c9;
}
.rastreio__aviso--config {
    background: rgba(255, 196, 0, .07);
    border-color: rgba(255, 196, 0, .3);
    color: var(--yellow);
}

/* ---------- Cartão do resultado ---------- */
.rastreio__card {
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: var(--radius, 14px);
    padding: 1.6rem;
    animation: aparecer .3s ease;
}
@keyframes aparecer {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: none; }
}

.rastreio__cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    padding-bottom: 1.1rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 1.5rem;
}

.rastreio__rotulo {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 .2rem;
}

.rastreio__codigo {
    font-family: var(--font-title);
    font-size: 1.7rem;
    font-weight: 800;
    letter-spacing: 2px;
    color: var(--text);
    margin: 0;
}

.rastreio__selo {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    padding: .5rem 1rem;
    border-radius: 50px;
    font-size: .8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    border: 1.5px solid;
}
.rastreio__selo--ok      { background: rgba(37, 211, 102, .12); border-color: rgba(37, 211, 102, .5);  color: #6ee7a0; }
.rastreio__selo--info    { background: rgba(255, 196, 0, .10);  border-color: rgba(255, 196, 0, .45);  color: var(--yellow); }
.rastreio__selo--atencao { background: rgba(255, 150, 60, .12); border-color: rgba(255, 150, 60, .45); color: #ffb066; }
.rastreio__selo--erro    { background: rgba(255, 107, 107, .12); border-color: rgba(255, 107, 107, .45); color: #ff9c9c; }

/* ---------- Etapas ---------- */
.rastreio__etapas {
    display: flex;
    gap: 0;
    list-style: none;
    margin: 0 0 1.6rem;
    padding: 0;
}

.passo {
    flex: 1 1 0;
    position: relative;
    text-align: center;
    min-width: 0;
}

/* linha de ligação */
.passo::before {
    content: "";
    position: absolute;
    top: 9px;
    left: -50%;
    width: 100%;
    height: 2px;
    background: var(--line);
}
.passo:first-child::before { display: none; }
.passo--feito::before,
.passo--atual::before { background: var(--yellow); }

.passo__bola {
    position: relative;
    z-index: 1;
    display: block;
    width: 20px;
    height: 20px;
    margin: 0 auto .55rem;
    border-radius: 50%;
    background: var(--bg);
    border: 2px solid var(--line);
}
.passo--feito .passo__bola {
    background: var(--yellow);
    border-color: var(--yellow);
}
.passo--atual .passo__bola {
    background: var(--bg);
    border-color: var(--yellow);
    box-shadow: 0 0 0 4px rgba(255, 196, 0, .18);
    animation: pulsar 1.8s ease-in-out infinite;
}
@keyframes pulsar {
    0%, 100% { box-shadow: 0 0 0 4px rgba(255, 196, 0, .18); }
    50%      { box-shadow: 0 0 0 8px rgba(255, 196, 0, .06); }
}

.passo__nome {
    display: block;
    font-size: .7rem;
    line-height: 1.25;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .3px;
    padding: 0 .2rem;
}
.passo--feito .passo__nome { color: var(--text); }
.passo--atual .passo__nome { color: var(--yellow); font-weight: 700; }

/* ---------- Dados ---------- */
.rastreio__dados {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 1.1rem;
    background: var(--bg);
    border-radius: 10px;
}
.rastreio__dados dt {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: .2rem;
}
.rastreio__dados dd {
    margin: 0;
    font-size: .95rem;
    font-weight: 600;
    color: var(--text);
}

.rastreio__obs {
    margin: 1rem 0 0;
    padding: .9rem 1rem;
    background: rgba(255, 196, 0, .06);
    border-left: 3px solid var(--yellow);
    border-radius: 0 8px 8px 0;
    font-size: .9rem;
    line-height: 1.55;
    color: var(--text);
}

/* ---------- Ajuda ---------- */
.rastreio__ajuda {
    text-align: center;
    margin-top: 1.6rem;
    font-size: .88rem;
    color: var(--muted);
}
.rastreio__ajuda a {
    color: var(--yellow);
    font-weight: 600;
    text-decoration: none;
}
.rastreio__ajuda a:hover { text-decoration: underline; }

/* ---------- Celular ---------- */
@media (max-width: 600px) {
    .rastreio { padding: 6.5rem 0 3rem; }
    .rastreio__titulo { font-size: 2.2rem; }
    .rastreio__descricao { font-size: .93rem; }
    .rastreio__form { padding: 1.2rem; }
    .rastreio__linha { flex-direction: column; }
    .rastreio__botao { width: 100%; padding: 1rem; }
    .rastreio__campo { font-size: 16px; } /* evita zoom no iOS */
    .rastreio__card { padding: 1.2rem; }
    .rastreio__codigo { font-size: 1.4rem; }
    .passo__nome { font-size: .6rem; letter-spacing: 0; }
    .passo__bola { width: 16px; height: 16px; }
    .passo::before { top: 7px; }
    .rastreio__dados { grid-template-columns: 1fr; gap: .85rem; }
}
