/* =============================================
   TRACK PAGE — inherits style.css variables
   ============================================= */

.track-section {
    max-width: 860px;
    margin: 0 auto;
    padding: 50px 24px 80px;
}

/* FORM */
.track-form {
    background: var(--primary);
    padding: 40px 44px;
    border-radius: 16px;
    margin-bottom: 40px;
    box-shadow: 0 10px 40px rgba(0,61,130,0.25);
}

.track-form form {
    display: flex;
    gap: 16px;
    align-items: flex-end;
}

.track-hint {
    display: block;
    color: rgba(255,255,255,0.55);
    font-size: 12px;
    margin-top: 10px;
}

.track-form .form-group {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.track-form label {
    color: rgba(255,255,255,0.85);
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
}

.track-form input {
    padding: 14px 18px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    font-size: 16px;
    background: rgba(255,255,255,0.1);
    color: #fff;
    transition: border-color 0.2s, background 0.2s;
    font-family: inherit;
}

.track-form input::placeholder { color: rgba(255,255,255,0.5); }
.track-form input:focus { outline: none; border-color: var(--accent); background: rgba(255,255,255,0.18); }

.track-form small {
    color: rgba(255,255,255,0.55);
    font-size: 12px;
}

.track-form .btn-accent {
    white-space: nowrap;
    padding: 14px 28px;
    font-size: 15px;
}

/* RESULTS ANIMATION */
.tracking-results {
    animation: fadeUp 0.4s ease both;
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* SHIPMENT INFO BANNER */
.shipment-info {
    background: #fff;
    padding: 24px 28px;
    border-radius: 12px;
    border-left: 5px solid var(--primary);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    border-left-width: 5px;
    border-left-color: var(--primary);
}
.shipment-info h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 18px;
    color: var(--primary);
    margin-bottom: 6px;
}
.shipment-info p { color: var(--text-md); font-size: 14px; }

/* STATUS BOX */
.status-box {
    background: #fff;
    padding: 36px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    margin-bottom: 20px;
    text-align: center;
    border: 1px solid var(--border);
    border-top: 4px solid var(--primary);
}

.status-badge {
    display: inline-block;
    padding: 10px 28px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 50px;
    margin-bottom: 16px;
    letter-spacing: 0.5px;
}

.status-badge.status-pending       { background: #f1f5f9; color: #475569; }
.status-badge.status-picked_up     { background: #dbeafe; color: var(--primary); }
.status-badge.status-in_transit    { background: #fef3c7; color: #92400e; }
.status-badge.status-in_customs,
.status-badge.status-customs       { background: #fee2e2; color: #991b1b; }
.status-badge.status-out_for_delivery { background: #d1fae5; color: #065f46; }
.status-badge.status-delivered     { background: #d1fae5; color: #14532d; }
.status-badge.status-returned      { background: #fee2e2; color: #991b1b; }

.status-location {
    font-size: 17px;
    font-weight: 600;
    color: var(--text);
    margin: 8px 0;
}
.status-updated {
    color: var(--text-lt);
    font-size: 13px;
    margin-bottom: 0;
}
.status-notes {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-md);
    font-style: italic;
}

/* SHIPMENT DETAILS TABLE */
.shipment-details {
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 20px;
}
.shipment-details h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}
.shipment-details table { width: 100%; border-collapse: collapse; }
.shipment-details td {
    padding: 11px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
}
.shipment-details tr:last-child td { border-bottom: none; }
.shipment-details td:first-child {
    font-weight: 600;
    color: var(--primary);
    width: 38%;
}
.shipment-details td:last-child { color: var(--text-md); }

/* TRACKING HISTORY */
.tracking-history {
    background: #fff;
    padding: 28px;
    border-radius: 12px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}
.tracking-history h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 24px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--border);
}

.timeline { position: relative; }
.timeline::before {
    content: '';
    position: absolute;
    left: 18px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--border);
}

.timeline-item {
    display: flex;
    gap: 18px;
    margin-bottom: 24px;
    position: relative;
}

.timeline-check {
    position: relative;
    width: 38px;
    height: 38px;
    background: var(--success);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(22,163,74,0.3);
}

.timeline-content { flex: 1; padding-top: 4px; }
.timeline-status {
    font-weight: 600;
    font-size: 15px;
    color: var(--primary);
    margin-bottom: 4px;
}
.timeline-location { font-size: 13px; color: var(--text-md); margin-bottom: 3px; }
.timeline-date     { font-size: 12px; color: var(--text-lt); }
.timeline-notes    { font-size: 13px; color: var(--text-md); margin-top: 6px; font-style: italic; }

/* ERROR */
.error-message {
    background: #fee2e2;
    color: #991b1b;
    padding: 16px 20px;
    border-radius: 10px;
    border-left: 4px solid var(--danger);
    font-size: 14px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
    .track-form { padding: 24px 20px; }
    .track-form form { flex-direction: column; align-items: stretch; }
    .track-form .btn-accent { width: 100%; justify-content: center; }
    .status-box { padding: 24px 16px; }
    .shipment-details, .tracking-history { padding: 20px 16px; }
}
