/* ============================================================
   DIVELA — order tracking page styles
   Uses shared design tokens from style.css :root
   ============================================================ */

.track-page { background: var(--cream); }

[hidden] { display: none !important; }

/* ---------- section ---------- */
.track-section {
    padding: 90px 0 110px;
    min-height: 70vh;
    display: flex;
    align-items: center;
    background:
        radial-gradient(ellipse 60% 40% at 85% 0%, rgba(246, 197, 169, 0.35), transparent 70%),
        radial-gradient(ellipse 50% 35% at 0% 100%, rgba(169, 216, 203, 0.3), transparent 70%);
}
.track-inner { max-width: 640px; text-align: center; }
.track-lead {
    color: var(--ink-soft);
    line-height: 1.7;
    margin: 18px auto 38px;
    max-width: 460px;
}
.track-lead strong { color: var(--ink); }

/* ---------- form ---------- */
.track-form {
    display: flex;
    gap: 14px;
    align-items: flex-end;
    justify-content: center;
    flex-wrap: wrap;
    background: var(--paper);
    border: 1.5px solid rgba(51, 39, 46, 0.08);
    border-radius: 24px;
    padding: 26px;
    box-shadow: 0 20px 50px rgba(51, 39, 46, 0.08);
    text-align: left;
}
.tf-field { flex: 1 1 180px; display: flex; flex-direction: column; gap: 8px; }
.tf-field label { font-size: 13px; font-weight: 600; color: var(--ink-soft); letter-spacing: 0.04em; text-transform: uppercase; }
.tf-field input {
    border: 1.5px solid rgba(51, 39, 46, 0.15);
    border-radius: 100px;
    padding: 14px 22px;
    font-family: var(--sans);
    font-size: 15px;
    color: var(--ink);
    background: var(--cream);
    outline: none;
    transition: border-color 0.25s var(--ease), box-shadow 0.25s var(--ease);
}
.tf-field input:focus {
    border-color: var(--pink);
    box-shadow: 0 0 0 4px rgba(224, 120, 95, 0.15);
}
#trackOrder { text-transform: uppercase; }
.track-form .btn { flex: 0 0 auto; }

.track-error {
    margin-top: 18px;
    color: var(--pink-deep);
    font-size: 14.5px;
    background: rgba(224, 120, 95, 0.12);
    border-radius: 100px;
    padding: 10px 22px;
    display: inline-block;
}

/* ---------- result card ---------- */
.track-result {
    margin-top: 40px;
    background: var(--paper);
    border: 1.5px solid rgba(51, 39, 46, 0.08);
    border-radius: 24px;
    padding: 34px 34px 28px;
    box-shadow: 0 20px 50px rgba(51, 39, 46, 0.08);
    text-align: left;
    animation: trackPop 0.5s var(--ease);
}
@keyframes trackPop {
    from { opacity: 0; transform: translateY(14px); }
    to { opacity: 1; transform: none; }
}

.tr-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    flex-wrap: wrap;
}
.tr-label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); margin-bottom: 4px; }
.tr-number { font-family: var(--serif); font-size: 2rem; color: var(--ink); }
.tr-date { font-size: 13.5px; color: var(--ink-soft); margin-top: 4px; }

.tr-pill {
    padding: 8px 20px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    background: rgba(224, 120, 95, 0.14);
    color: var(--pink-deep);
}
.tr-pill[data-status="confirmed"] { background: rgba(219, 157, 74, 0.16); color: var(--gold-deep); }
.tr-pill[data-status="fulfilled"] { background: rgba(169, 216, 203, 0.28); color: #2F6B5E; }
.tr-pill[data-status="cancelled"] { background: rgba(51, 39, 46, 0.1); color: var(--ink-soft); }

/* ---------- status steps ---------- */
.tr-steps {
    display: flex;
    justify-content: space-between;
    margin: 34px 6px 10px;
    position: relative;
}
.tr-steps::before {
    content: '';
    position: absolute;
    top: 17px;
    left: 24px;
    right: 24px;
    height: 2px;
    background: rgba(51, 39, 46, 0.12);
}
.tr-step {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.tr-dot {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--cream);
    border: 2px solid rgba(51, 39, 46, 0.15);
    color: var(--ink-soft);
    display: grid;
    place-items: center;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s var(--ease);
}
.tr-step-label { font-size: 12.5px; color: var(--ink-soft); font-weight: 500; }
.tr-step.done .tr-dot { background: var(--mint); border-color: var(--mint); color: var(--ink); }
.tr-step.done .tr-step-label { color: var(--ink); }
.tr-step.current .tr-dot {
    background: var(--pink);
    border-color: var(--pink);
    color: var(--cream);
    box-shadow: 0 0 0 6px rgba(224, 120, 95, 0.18);
}

.tr-cancelled {
    margin: 26px 0 6px;
    padding: 14px 20px;
    border-radius: 16px;
    background: rgba(51, 39, 46, 0.06);
    color: var(--ink-soft);
    font-size: 14.5px;
    line-height: 1.6;
}

/* ---------- items ---------- */
.tr-items { margin-top: 28px; }
.tr-items h3 {
    font-family: var(--serif);
    font-size: 1.15rem;
    margin-bottom: 14px;
    color: var(--ink);
}
.tr-items ul { list-style: none; }
.tr-items li {
    display: flex;
    justify-content: space-between;
    gap: 14px;
    padding: 11px 0;
    border-bottom: 1px dashed rgba(51, 39, 46, 0.12);
    font-size: 15px;
    color: var(--ink);
}
.ti-qty { color: var(--ink-soft); }
.ti-line { font-weight: 600; white-space: nowrap; }
.tr-total {
    display: flex;
    justify-content: space-between;
    padding-top: 16px;
    font-weight: 700;
    font-size: 16px;
    color: var(--ink);
}

.tr-help { margin-top: 22px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.6; }

/* ---------- footer ---------- */
.track-footer { padding: 26px 0; }
.track-footer a { color: var(--cream); text-decoration: underline; }

/* ---------- responsive ---------- */
@media (max-width: 640px) {
    .track-section { padding: 60px 0 80px; }
    .track-form { flex-direction: column; align-items: stretch; padding: 22px; }
    .track-form .btn { width: 100%; }
    .track-result { padding: 26px 20px; }
    .tr-step-label { font-size: 11px; }
}

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    .track-result { animation: none; }
}
