/* ============================================
   T-Shirt Elephant - Track Your Order + Order Status (2026)
   Shared stylesheet for /user/track-your-order and /user/order-status
   ============================================ */

.to-page,
.os-page {
    --te-primary: #1776C8;
    --te-primary-dark: #125A9C;
    --te-primary-light: #2B90E7;
    --te-success: #10b981;
    --te-danger: #ef4444;
    --te-gray-50: #f9fafb;
    --te-gray-100: #f3f4f6;
    --te-gray-200: #e5e7eb;
    --te-gray-300: #d1d5db;
    --te-gray-400: #9ca3af;
    --te-gray-500: #6b7280;
    --te-gray-600: #4b5563;
    --te-gray-700: #374151;
    --te-gray-900: #111827;
    --te-radius: 8px;
    --te-radius-md: 12px;
    --te-radius-lg: 16px;
    --te-shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --te-shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);

    /* The header is position:fixed, so the section starts at the top of the
       document and its wash runs up behind the header — padding (not margin)
       clears it, otherwise the body shows as a white bar under the header. */
    margin-top: 0;
    padding: 165px 16px 96px; /* 145px fixed header + 20px breathing room */
    background: var(--te-gray-50);
    min-height: 60vh;
    font-family: inherit;
}

@media (max-width: 991px) {
    .to-page,
    .os-page {
        padding-top: 118px; /* 100px header + 18px */
    }
}

@media (max-width: 767px) {
    .to-page,
    .os-page {
        padding: 84px 12px 64px; /* 70px header + 14px */
    }
}

/* ---------- Shared card ---------- */

.to-card,
.os-card {
    background: #fff;
    border: 1px solid var(--te-gray-200);
    border-radius: var(--te-radius-lg);
    box-shadow: var(--te-shadow-md);
    margin: 0 auto;
}

.to-card {
    max-width: 520px;
    padding: 40px 36px 32px;
    text-align: center;
}

.os-card {
    max-width: 760px;
    padding: 36px 36px 28px;
}

@media (max-width: 767px) {
    .to-card {
        padding: 28px 20px 24px;
    }
    .os-card {
        padding: 24px 16px 20px;
    }
}

/* ---------- Alerts ---------- */

.to-alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    text-align: left;
    border-radius: var(--te-radius);
    padding: 12px 14px;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 20px;
}

.to-alert svg {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 2px;
}

.to-alert-error {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
}

.to-alert-success {
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    color: #15803d;
}

/* ---------- Track form ---------- */

.to-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--te-primary) 0%, var(--te-primary-light) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
}

.to-icon svg {
    width: 32px;
    height: 32px;
    stroke: currentColor;
    fill: none;
}

/* Bootstrap Icons are filled outlines, not stroked paths */
svg.bi-fill,
.to-icon svg.bi-fill,
.os-dot svg.bi-fill {
    fill: currentColor;
    stroke: none;
}

.to-icon svg.bi-fill {
    width: 30px;
    height: 30px;
}

.to-card h1 {
    font-size: 26px;
    font-weight: 700;
    color: var(--te-gray-900);
    margin: 0 0 8px;
    letter-spacing: -0.01em;
}

.to-sub {
    font-size: 15px;
    color: var(--te-gray-500);
    margin: 0 0 26px;
    line-height: 1.5;
}

.to-form {
    text-align: left;
}

.to-field {
    margin-bottom: 18px;
}

.to-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: var(--te-gray-700);
    margin-bottom: 6px;
}

.to-field input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    font-size: 15px;
    color: var(--te-gray-900);
    background: #fff;
    border: 1px solid var(--te-gray-300);
    border-radius: var(--te-radius);
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
    -webkit-appearance: none;
    appearance: none;
}

.to-field input:focus {
    outline: none;
    border-color: var(--te-primary);
    box-shadow: 0 0 0 3px rgba(23, 118, 200, 0.15);
}

.to-field input::placeholder {
    color: var(--te-gray-400) !important;
    opacity: 1;
}

.to-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    height: 50px;
    margin-top: 6px;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    background: linear-gradient(135deg, var(--te-primary) 0%, var(--te-primary-light) 100%);
    border: 0;
    border-radius: var(--te-radius);
    cursor: pointer;
    transition: filter 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.to-submit svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

.to-submit:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
    box-shadow: var(--te-shadow-md);
}

.to-submit:focus-visible {
    outline: 3px solid rgba(23, 118, 200, 0.4);
    outline-offset: 2px;
}

.to-help {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid var(--te-gray-100);
    font-size: 13px;
    color: var(--te-gray-500);
    line-height: 1.6;
}

.to-help p {
    margin: 0 0 6px;
}

.to-help a {
    color: var(--te-primary);
    font-weight: 600;
    text-decoration: none;
}

.to-help a:hover {
    text-decoration: underline;
}

/* ---------- Order status ---------- */

.os-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 8px;
}

.os-head h1 {
    font-size: 15px;
    font-weight: 600;
    color: var(--te-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0;
}

.os-order-id {
    font-size: 26px;
    font-weight: 700;
    color: var(--te-gray-900);
    letter-spacing: -0.01em;
    margin: 2px 0 0;
}

.os-pill {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    letter-spacing: 0.02em;
    background: var(--te-gray-100);
    color: var(--te-gray-600);
    white-space: nowrap;
}

.os-pill-active {
    background: #eaf3fc;
    color: var(--te-primary-dark);
}

.os-pill-done {
    background: #f0fdf4;
    color: #15803d;
}

.os-pill-cancelled {
    background: #fef2f2;
    color: #b91c1c;
}

/* Timeline */

.os-timeline {
    display: flex;
    margin: 34px 0 10px;
}

.os-step {
    flex: 1;
    text-align: center;
    position: relative;
}

.os-step::before {
    content: '';
    position: absolute;
    top: 19px;
    left: -50%;
    width: 100%;
    height: 3px;
    background: var(--te-gray-200);
    z-index: 0;
}

.os-step:first-child::before {
    display: none;
}

.os-step.done::before,
.os-step.current::before {
    background: var(--te-primary);
}

.os-dot {
    position: relative;
    z-index: 1;
    width: 40px;
    height: 40px;
    margin: 0 auto 10px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid var(--te-gray-300);
    color: var(--te-gray-400);
    display: flex;
    align-items: center;
    justify-content: center;
}

.os-dot svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    fill: none;
}

.os-step.done .os-dot {
    background: var(--te-primary);
    border-color: var(--te-primary);
    color: #fff;
}

.os-step.current .os-dot {
    border-color: var(--te-primary);
    color: var(--te-primary);
    box-shadow: 0 0 0 5px rgba(23, 118, 200, 0.15);
}

.os-step-label {
    font-size: 13px;
    font-weight: 700;
    color: var(--te-gray-400);
}

.os-step.done .os-step-label,
.os-step.current .os-step-label {
    color: var(--te-gray-900);
}

.os-step-hint {
    font-size: 12px;
    color: var(--te-gray-400);
    margin-top: 2px;
}

@media (max-width: 480px) {
    .os-step-hint {
        display: none;
    }
    .os-step-label {
        font-size: 11px;
    }
}

/* Cancelled banner */

.os-cancelled {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 26px 0 6px;
    padding: 14px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: var(--te-radius);
    color: #b91c1c;
    font-size: 14px;
    line-height: 1.5;
}

.os-cancelled svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    margin-top: 1px;
}

/* Detail grid */

.os-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    margin-top: 28px;
}

.os-cell {
    background: var(--te-gray-50);
    border: 1px solid var(--te-gray-100);
    border-radius: var(--te-radius-md);
    padding: 14px 16px;
}

.os-cell h2 {
    font-size: 11px;
    font-weight: 700;
    color: var(--te-gray-500);
    text-transform: uppercase;
    letter-spacing: 0.07em;
    margin: 0 0 6px;
}

.os-cell p {
    font-size: 15px;
    font-weight: 600;
    color: var(--te-gray-900);
    margin: 0;
    line-height: 1.4;
    word-break: break-word;
}

.os-cell p.muted {
    color: var(--te-gray-400);
    font-weight: 400;
    font-size: 14px;
}

.os-cell p a {
    color: var(--te-primary);
    text-decoration: none;
    font-weight: 700;
}

.os-cell p a:hover {
    text-decoration: underline;
}

/* Footer links */

.os-foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 26px;
    padding-top: 18px;
    border-top: 1px solid var(--te-gray-100);
    font-size: 14px;
}

.os-foot a {
    color: var(--te-primary);
    font-weight: 600;
    text-decoration: none;
}

.os-foot a:hover {
    text-decoration: underline;
}

.os-foot .contact {
    color: var(--te-gray-500);
}
