/* G-Train Tracking Styles - Enhanced 2026 */
.gtrain-track-container {
    max-width: 850px;
    margin: 2rem auto;
    padding: 3rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px;
    box-shadow: 0 25px 50px rgba(0,0,0,0.2), inset 0 0 0 1px rgba(255,255,255,0.2);
    position: relative;
    border: 1px solid rgba(255,255,255,0.1);
}

.gtrain-track-form {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.gtrain-track-form input {
    flex: 1;
    padding: 18px 28px;
    border: 2px solid transparent;
    border-radius: 14px;
    font-size: 1.15rem;
    transition: all 0.3s;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: inset 0 2px 4px rgba(0,0,0,0.05);
    color: #0f172a;
}

.gtrain-track-form input:focus {
    border-color: #e11d48;
    box-shadow: 0 0 0 4px rgba(225, 29, 72, 0.1);
    outline: none;
}

.gtrain-btn {
    padding: 18px 36px;
    background: linear-gradient(135deg, #e11d48, #be123c);
    background-size: 200% auto;
    color: white;
    border: none;
    border-radius: 14px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 10px 25px rgba(225, 29, 72, 0.3);
}

.gtrain-btn:hover {
    background-position: right center;
    transform: translateY(-3px);
    box-shadow: 0 15px 35px rgba(225, 29, 72, 0.5);
}

/* Loader & Errors */
.gtrain-loader {
    text-align: center;
    padding: 40px;
    color: #64748b;
    font-weight: 600;
}
.gtrain-error {
    background: #fff1f2;
    color: #e11d48;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    margin-top: 20px;
}

/* Result Dashboard */
.gtrain-result {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    background: #ffffff;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.gtrain-header {
    background: linear-gradient(135deg, #0a192f, #1e293b);
    color: white;
    padding: 30px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 4px solid #e11d48;
}

/* Progress Bar */
.gtrain-progress-wrap {
    padding: 40px 35px 20px;
}

.progress-track {
    height: 6px;
    background: #f1f5f9;
    border-radius: 10px;
    position: relative;
    margin-bottom: 25px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #10b981, #34d399);
    border-radius: 10px;
    transition: width 1s ease-in-out;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
}

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

.step span {
    font-size: 0.75rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    display: block;
}

.step.active span {
    color: #0f172a;
}

.step::before {
    content: '';
    width: 14px;
    height: 14px;
    background: #cbd5e1;
    border-radius: 50%;
    position: absolute;
    top: -35px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    border: 4px solid white;
    box-shadow: 0 0 0 4px rgba(203, 213, 225, 0.3);
    transition: all 0.4s ease;
}

.step.active::before {
    background: #10b981;
    box-shadow: 0 0 15px rgba(16, 185, 129, 0.6), 0 0 0 4px rgba(16, 185, 129, 0.2);
}

/* Map Graphic */
.gtrain-map-graphic {
    padding: 0 35px 30px;
    text-align: center;
}

.gtrain-map-graphic svg {
    max-width: 100%;
    height: auto;
}

#route-line {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: dash 2s ease-in-out forwards;
}

@keyframes dash {
    to { stroke-dashoffset: 0; }
}

/* Details Grid */
.gtrain-details-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    padding: 30px 35px;
    gap: 30px;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-bottom: 1px solid #e2e8f0;
}

.gtrain-details-grid div {
    font-size: 0.95rem;
    line-height: 1.8;
}

.gtrain-details-grid strong {
    color: #64748b;
    text-transform: uppercase;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 4px;
}

/* Timeline */
.gtrain-timeline { padding: 40px 35px; }

.gtrain-timeline ul { list-style: none; padding: 0; position: relative; }
.gtrain-timeline ul::before {
    content: '';
    position: absolute;
    left: 120px;
    top: 5px;
    bottom: 5px;
    width: 2px;
    background: #e2e8f0;
}

.gtrain-timeline li { display: flex; margin-bottom: 30px; position: relative; }
.gtrain-timeline .time { width: 100px; font-size: 0.85rem; color: #64748b; text-align: right; padding-right: 40px; }
.gtrain-timeline .status { font-weight: 700; color: #0f172a; flex: 1; padding-left: 20px; }
.gtrain-timeline .loc { font-size: 0.85rem; color: #64748b; }

.status-badge {
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 800;
    background: rgba(255,255,255,0.1);
    color: white;
}

.status-badge.delivered { background: #10b981; }
.status-badge.in_transit { background: #3b82f6; }
.status-badge.exception { background: #ef4444; }

@media (max-width: 600px) {
    .gtrain-details-grid { grid-template-columns: 1fr; }
    .gtrain-timeline ul::before { left: 10px; }
    .gtrain-timeline .time { width: auto; text-align: left; padding: 0 0 0 35px; order: 2; margin-top: 5px; }
    .gtrain-timeline li { flex-direction: column; }
    .gtrain-timeline .status { padding-left: 35px; order: 1; }
}
