
/* Timeline Styles */
.timeline-container {
    margin-top: 50px;
    position: relative;
    padding-bottom: 20px;
}

/* Horizontal (Default) Track */
.timeline-track-bg {
    position: absolute;
    top: 22px; /* Center of 50px circle - half line height (6px/2) */
    left: 12.5%;
    width: 75%;
    height: 6px;
    background: #E6E6E6; /* Slightly lighter gray for the track */
    z-index: 0;
}

.timeline-progress-bar {
    position: absolute;
    top: 22px;
    left: 12.5%;
    height: 6px;
    background: #0A5F68; /* Darker Teal matching the image exactly */
    z-index: 0;
    transition: width 0.5s ease;
}

.timeline-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    z-index: 1;
}

.timeline-step {
    width: 25%;
    text-align: center;
    position: relative; /* For z-index context */
}

.timeline-circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    background: #fff;
    border: 5px solid #E6E6E6; /* Match track background */
    color: transparent; /* Hide checkmark if not active */
    transition: all 0.3s ease;
}

.timeline-step.active .timeline-circle {
    background: #0A5F68; /* Darker Teal */
    border-color: #0A5F68;
    color: #fff;
}

.timeline-label {
    margin-top: 15px;
    font-weight: 700;
    color: #B0B0B0; /* Inactive text is gray */
    font-size: 18px;
    transition: color 0.3s ease;
}

.timeline-step.active .timeline-label {
    color: #000; /* Active text is black */
}

.timeline-date {
    font-size: 14px;
    color: #B0B0B0; /* Inactive date is gray */
    margin-top: 5px;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.timeline-step.active .timeline-date {
    color: #333; /* Active date is dark gray */
}

/* Vertical Timeline Styles */
.timeline-container.vertical {
    padding-left: 20px;
    margin-top: 30px;
}

.timeline-container.vertical .timeline-track-bg {
    top: 25px;
    left: 45px; /* Center of circle (20px pad + 25px center) */
    width: 6px;
    height: calc(100% - 70px); /* Adjust based on step count */
    background: #E6E6E6;
}

.timeline-container.vertical .timeline-progress-bar {
    top: 25px;
    left: 45px;
    width: 6px;
    height: 0; /* JS will set height */
    transition: height 0.5s ease;
}

.timeline-container.vertical .timeline-steps {
    flex-direction: column;
    align-items: flex-start;
}

.timeline-container.vertical .timeline-step {
    width: 100%;
    display: flex;
    align-items: center;
    text-align: left;
    margin-bottom: 30px;
    position: relative;
}

.timeline-container.vertical .timeline-step:last-child {
    margin-bottom: 0;
}

.timeline-container.vertical .timeline-circle {
    margin: 0;
    margin-right: 20px;
    flex-shrink: 0;
    z-index: 2; /* Above track */
}

.timeline-container.vertical .timeline-content {
    display: flex;
    flex-direction: column;
}

.timeline-container.vertical .timeline-label {
    margin-top: 0;
    margin-bottom: 5px;
}

.timeline-container.vertical .timeline-date {
    margin-top: 0;
}

/* =========================================
   NEW VERTICAL LAYOUT STYLES (User Request)
   ========================================= */

.tracking-result-card.vertical-layout-mode {
    padding: 0;
    overflow: hidden;
    border: 1px solid #e0e0e0;
}

.wu-header {
    background: #f0f0f0;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: 600;
    border-bottom: 1px solid #ddd;
    color: #333;
}

.wu-sub-header {
    background: #f9f9f9;
    padding: 20px;
    text-align: center;
    border-bottom: 1px solid #eee;
}

.wu-mtcn-box {
    display: inline-block;
    text-align: center;
}

.wu-label {
    display: block;
    font-size: 13px;
    color: #777;
    margin-bottom: 4px;
    font-weight: 600;
}

.wu-value {
    font-size: 24px;
    font-weight: 700;
    color: #000;
}

.wu-split-container {
    display: flex;
    padding: 30px 40px;
    min-height: 400px;
}

.wu-timeline-left {
    flex: 0 0 200px; /* Fixed width for timeline */
    position: relative;
    padding-top: 10px;
}

.wu-status-right {
    flex: 1;
    padding-left: 40px;
    border-left: 1px solid #eee; /* Divider */
    padding-top: 10px;
}

/* Timeline Line - Removed global line, using per-step lines */
/* .wu-vert-line removed */

/* Step Row */
.wu-step-row {
    display: flex;
    align-items: flex-start; /* Align to top to handle lines correctly */
    padding-bottom: 40px; /* Space for the line */
    position: relative;
    z-index: 1;
}

.wu-step-row:last-child {
    padding-bottom: 0;
}

/* Circles */
.wu-circle-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-right: 15px;
    width: 40px; /* Fixed width */
}

.wu-circle {
    width: 32px; /* Slightly smaller to match image */
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #fff;
    border: 2px solid #e0e0e0; /* Thinner border */
    font-size: 14px;
    color: #fff;
    transition: all 0.3s;
    flex-shrink: 0;
    z-index: 2;
}

/* Connecting Line */
.wu-step-line {
    width: 3px;
    flex-grow: 1;
    background: #e0e0e0;
    min-height: 30px; /* Minimum height for the line */
    margin-top: -2px; /* Overlap slightly */
    margin-bottom: -2px;
}

.wu-step-row:last-child .wu-step-line {
    display: none;
}

/* Completed: Green Fill, Checkmark */
.wu-circle.completed {
    background: #4aa748; /* Green from image */
    border-color: #4aa748;
    color: #fff;
}

.wu-step-line.completed {
    background: #4aa748;
}

/* Current: Green Ring, Green Dot inside */
.wu-circle.current {
    border-color: #4aa748;
    background: #fff;
    border-width: 2px;
}

.wu-inner-dot {
    width: 14px;
    height: 14px;
    background: #4aa748;
    border-radius: 50%;
}

/* Future: Gray Ring (Default) */
.wu-circle.future {
    border-color: #e0e0e0;
}

/* Labels */
.wu-step-label {
    font-size: 16px;
    color: #333;
    font-weight: 400;
    padding-top: 6px; /* Align with circle */
}

.wu-step-label.active-text {
    font-weight: 700;
    color: #000;
}

/* Status Box */
.wu-status-box h3 {
    font-size: 20px;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    font-weight: 600;
}

.wu-status-box p {
    font-size: 15px;
    color: #333;
    line-height: 1.6;
}

/* Responsive */
@media (max-width: 768px) {
    .wu-split-container {
        flex-direction: column;
        padding: 20px;
    }
    .wu-timeline-left {
        margin-bottom: 40px;
        flex: auto;
        border-bottom: 1px solid #eee;
        padding-bottom: 20px;
    }
    .wu-status-right {
        border-left: none;
        padding-left: 0;
        padding-top: 20px;
    }
}
