/* Basic Reset/Defaults */
body, html {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}
*, *:before, *:after {
    box-sizing: inherit;
}

.tracking-page-body {
    background-color: #e6e6e6; /* Darker gray background */
    color: #333333;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Floating background elements */
.bg-elements {
    position: fixed; /* Changed from absolute to fixed for better coverage */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.bg-element {
    position: absolute;
    opacity: 0.2; /* Increased opacity for better visibility */
    color: #333333;
    font-size: 1rem; /* Smaller base size for icons */
}

.bg-element.truck {
    width: 80px;
    height: 80px;
    top: 15%;
    left: 10%;
    animation: float 15s ease-in-out infinite;
}

.bg-element.box {
    width: 60px;
    height: 60px;
    bottom: 20%;
    right: 15%;
    animation: float 12s ease-in-out infinite 2s;
}

.bg-element.plane {
    width: 100px;
    height: 100px;
    top: 70%;
    left: 20%;
    animation: float 20s ease-in-out infinite 1s;
}

.bg-element.ship {
    width: 120px;
    height: 120px;
    top: 30%;
    right: 10%;
    animation: float 18s ease-in-out infinite 3s;
}

.bg-element.circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #333333;
    top: 25%;
    left: 30%;
    animation: float 10s ease-in-out infinite 1s;
}

.bg-element.triangle {
    width: 0;
    height: 0;
    border-left: 30px solid transparent;
    border-right: 30px solid transparent;
    border-bottom: 50px solid #333333;
    bottom: 15%;
    left: 40%;
    animation: float 14s ease-in-out infinite 2s;
}

.bg-element.square {
    width: 50px;
    height: 50px;
    border: 2px solid #333333;
    transform: rotate(45deg);
    top: 60%;
    right: 25%;
    animation: float 16s ease-in-out infinite;
}

@keyframes float {
    0% {
        transform: translateY(0) rotate(0deg);
    }
    50% {
        transform: translateY(-20px) rotate(5deg);
    }
    100% {
        transform: translateY(0) rotate(0deg);
    }
}

.tracking-container {
    max-width: 500px;
    width: 100%;
    text-align: center;
    padding: 40px 40px 30px;
    background-color: #ffffff; /* White background */
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    border-radius: 8px;
    position: relative;
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    margin: 20px;
}

.tracking-container::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, rgba(66, 153, 225, 0.5), transparent);
}

/* Removed the blue line that was causing overflow */

/* Container background patterns */
.container-pattern {
    position: absolute;
    opacity: 0.03;
    z-index: 0;
}

.pattern-circle {
    width: 100px;
    height: 100px;
    border: 2px solid #333;
    border-radius: 50%;
    top: 20px;
    right: 20px;
}

.pattern-triangle {
    width: 0;
    height: 0;
    border-left: 50px solid transparent;
    border-right: 50px solid transparent;
    border-bottom: 80px solid #333;
    bottom: 20px;
    left: 20px;
}

.pattern-square {
    width: 60px;
    height: 60px;
    border: 2px solid #333;
    transform: rotate(45deg);
    bottom: 40px;
    right: 40px;
}

.tracking-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 12px;
    color: #1A202C;
}

.tracking-subtitle {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 30px;
}

.tracking-form .input-group {
    display: flex;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
    position: relative;
    z-index: 1;
}

.tracking-input {
    flex-grow: 1;
    padding: 12px 15px 12px 40px;
    font-size: 1rem;
    border: none;
    outline: none;
    color: #333333;
    background-color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.05);
}

.tracking-input::placeholder {
    color: #A0AEC0;
}

.input-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #A0AEC0;
    z-index: 2;
}

.tracking-button {
    padding: 12px 20px;
    font-size: 1rem;
    background-color: #333333;
    color: #ffffff;
    border: none;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tracking-button:hover {
    background-color: #555555;
}

.tracking-button .button-text {
    display: inline;
}

.tracking-note {
    font-size: 0.7rem;
    color: #718096;
    margin-top: 10px;
    margin-bottom: 0;
    text-align: left;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tracking-note span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.note-icon {
    color: #4A5568;
    margin-top: 2px;
    flex-shrink: 0;
}

/* Hide text on smaller screens */
@media (max-width: 480px) {
    .tracking-button .button-text {
        display: none;
    }
    .tracking-button {
        padding: 12px 15px;
    }
    .tracking-container {
        padding: 20px;
    }
}

.tracking-results-area {
    margin-top: 20px;
    text-align: left;
    min-height: 0;
}

/* Loading Spinner */
.loading-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #555555;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error Message */
.tracking-error {
    color: #E53E3E;
    background-color: #FFF5F5;
    border: 1px solid #FC8181;
    padding: 15px;
    border-radius: 6px;
    text-align: center;
    margin-top: 20px;
}

/* Tracking Result Page Styling */
.tracking-result-container {
    max-width: 800px;
    padding: 30px;
}

/* Delivery Route Timeline Styling */
.delivery-route-timeline {
    margin: 30px 0;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.delivery-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
    padding: 0 10px;
}

.delivery-steps::before {
    content: '';
    position: absolute;
    top: 30px;
    left: 50px;
    right: 50px;
    height: 2px;
    background-color: #e2e8f0;
    z-index: 1;
}

.delivery-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    flex: 1;
    max-width: 150px;
    text-align: center;
}

.step-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    color: #718096;
    font-size: 1.25rem;
    transition: all 0.3s ease;
}

.step-content {
    padding: 10px;
}

.step-label {
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 5px;
    color: #4a5568;
}

.step-description {
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 5px;
}

.step-status {
    font-size: 0.75rem;
    font-weight: 600;
    color: #3182ce;
    margin-bottom: 5px;
}

.step-date {
    font-size: 0.75rem;
    color: #718096;
}

.step-location {
    font-size: 0.75rem;
    color: #718096;
}

/* Step states */
.delivery-step.completed .step-icon {
    background-color: #48bb78;
    border-color: #48bb78;
    color: #ffffff;
}

.delivery-step.current .step-icon {
    background-color: #ffffff;
    border-color: #3182ce;
    color: #3182ce;
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.2);
}

/* Custom step styling */
.delivery-step.custom .step-icon {
    background-color: #f0f4ff;
    border-color: #3182ce;
}

.delivery-step.custom.current .step-icon {
    background-color: #3182ce;
    color: #ffffff;
    box-shadow: 0 0 0 4px rgba(49, 130, 206, 0.2);
}

.tracking-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.back-link {
    color: #333333;
    text-decoration: none;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: color 0.2s;
}

.back-link:hover {
    color: #555555;
}

/* Shipment Results Styling */
.shipment-details {
    background-color: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 8px;
    padding: 0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.shipment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
    padding: 20px;
    border-bottom: 1px solid #E2E8F0;
    background-color: #f8f9fa;
    border-radius: 8px 8px 0 0;
}

.shipment-tracking {
    display: flex;
    flex-direction: column;
}

.tracking-label {
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 5px;
}

.tracking-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1A202C;
}

.shipment-status {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-delivered {
    background-color: #F0FFF4;
    color: #2F855A;
}

.status-in-transit {
    background-color: #EBF8FF;
    color: #2B6CB0;
}

.status-pending {
    background-color: #FFFAF0;
    color: #C05621;
}

.status-delayed {
    background-color: #FFF5F5;
    color: #C53030;
}

.status-customs {
    background-color: #F0F4FF;
    color: #3182CE;
}

.shipment-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 0;
    padding: 20px;
    border-bottom: 1px solid #E2E8F0;
}

.info-column {
    padding: 0 10px;
}

.info-section {
    margin-bottom: 24px;
    text-align: left !important;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    transition: all 0.3s ease;
}

.info-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(44, 62, 80, 0.2);
}

/* Fix content alignment issues */
.section-header {
    background: linear-gradient(135deg,
        rgba(44, 62, 80, 0.03) 0%,
        rgba(44, 62, 80, 0.08) 100%);
    border-bottom: 2px solid rgba(44, 62, 80, 0.2);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.section-content {
    padding: 20px;
    text-align: left !important;
}

.info-row {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    text-align: left !important;
    margin-bottom: 15px;
    padding: 0;
}

.section-divider {
    border: none;
    height: 2px;
    margin: 20px 0;
    background: linear-gradient(90deg,
        var(--primary-color, #2c3e50) 0%,
        rgba(44, 62, 80, 0.3) 50%,
        rgba(44, 62, 80, 0.1) 100%);
    border-radius: 2px;
}

/* Primary color visual hierarchy */
.info-row:hover {
    background: linear-gradient(90deg,
        rgba(44, 62, 80, 0.03) 0%,
        transparent 100%);
    border-radius: 4px;
    padding: 2px 8px;
    margin: 13px -8px 13px -8px;
    transition: all 0.2s ease;
}

.section-icon {
    color: var(--primary-color, #2c3e50);
    background: rgba(44, 62, 80, 0.12);
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    border: 2px solid rgba(44, 62, 80, 0.25);
    line-height: 1;
    text-align: center;
    flex-shrink: 0;
    box-shadow: 0 2px 4px rgba(44, 62, 80, 0.15);
}

/* Enhanced section headers with primary color - FIXED ICON CENTERING */
.section-header {
    background: linear-gradient(135deg,
        rgba(44, 62, 80, 0.03) 0%,
        rgba(44, 62, 80, 0.08) 100%);
    border-bottom: 2px solid rgba(44, 62, 80, 0.2);
    position: relative;
    padding: 18px 24px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* Info cards with subtle primary color */
.info-card-horizontal:hover {
    box-shadow: 0 4px 12px rgba(44, 62, 80, 0.1);
    transform: translateY(-1px);
    transition: all 0.2s ease;
}

.info-card-header {
    background: linear-gradient(135deg,
        rgba(44, 62, 80, 0.03) 0%,
        rgba(44, 62, 80, 0.06) 100%);
    border-bottom: 1px solid rgba(44, 62, 80, 0.2);
}

.info-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
    min-width: 140px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left !important;
    margin-bottom: 0;
}

.info-label i {
    color: var(--primary-color, #2c3e50);
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.info-value {
    font-size: 0.875rem;
    color: #1a202c;
    font-weight: 500;
    flex: 1;
    word-break: break-word;
    text-align: left !important;
    line-height: 1.5;
}

/* Shipment Information Grid */
.shipment-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

/* Info Cards Horizontal Layout - ENHANCED */
.info-cards-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 24px 0;
}

.info-card-horizontal {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(226, 232, 240, 0.8);
    overflow: hidden;
    transition: all 0.3s ease;
}

.info-card-horizontal:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: rgba(44, 62, 80, 0.2);
}

.info-card-header {
    background: linear-gradient(135deg,
        rgba(44, 62, 80, 0.03) 0%,
        rgba(44, 62, 80, 0.08) 100%);
    padding: 18px 24px;
    border-bottom: 2px solid rgba(44, 62, 80, 0.2);
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.info-card-content {
    padding: 24px;
}

.info-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.info-detail-item {
    text-align: left;
}

.detail-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 5px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-transform: none;
}

.detail-label i {
    color: var(--primary-color, #2c3e50);
    font-size: 14px;
    width: 16px;
    text-align: center;
}

.detail-value {
    font-size: 0.875rem;
    color: #1a202c;
    font-weight: 500;
    word-break: break-word;
}

/* ============================================
   TABLET RESPONSIVE IMPROVEMENTS (768px - 1024px)
   ============================================ */
@media (max-width: 1024px) and (min-width: 769px) {
    /* Sidebar adjustments for tablet */
    .track-sidebar {
        width: 45px;
        padding: 12px 0;
    }

    .sidebar-brand {
        width: 32px;
        height: 32px;
        font-size: 14px;
        margin-bottom: 20px;
    }

    .sidebar-brand img {
        width: 26px;
        height: 26px;
    }

    .nav-icon {
        width: 36px;
        height: 36px;
    }

    .nav-icon i {
        font-size: 14px;
    }

    .notification-badge {
        width: 16px;
        height: 16px;
        font-size: 8px;
        top: -3px;
        right: -3px;
    }

    /* Main content margin adjustment */
    .tracking-content {
        margin-left: 45px !important;
    }

    /* Information grid adjustments */
    .shipment-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .info-section {
        margin-bottom: 15px;
    }

    /* Reduce padding for tablet */
    .section-header {
        padding: 12px 15px;
    }

    .section-content {
        padding: 15px;
    }

    .info-row {
        margin-bottom: 12px;
    }

    .info-label {
        min-width: 120px;
        font-size: 0.8rem;
    }

    .info-value {
        font-size: 0.8rem;
    }

    /* Card adjustments */
    .info-card-horizontal {
        margin-bottom: 15px;
    }

    .info-card-header {
        padding: 12px 15px;
    }

    .info-card-content {
        padding: 15px;
    }

    .info-details-grid {
        grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
        gap: 12px;
    }
}

/* ============================================
   MOBILE RESPONSIVE IMPROVEMENTS (< 768px)
   ============================================ */
@media (max-width: 768px) {
    /* Transform sidebar to hamburger menu */
    .track-sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 1001;
    }

    .track-sidebar.mobile-open {
        transform: translateX(0);
    }

    /* Mobile menu toggle button */
    .mobile-menu-toggle {
        display: block;
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1002;
        background: var(--primary-color, #2c3e50);
        color: white;
        border: none;
        border-radius: 8px;
        width: 44px;
        height: 44px;
        font-size: 18px;
        cursor: pointer;
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    }

    /* Main content adjustments */
    .tracking-content {
        margin-left: 0 !important;
        padding: 70px 15px 15px;
    }

    /* Full width layout for mobile */
    .shipment-info-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .info-details-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    /* Simplified info rows for mobile */
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 20px;
        padding: 0;
    }

    .info-row:hover {
        background: none;
        padding: 0;
        margin: 0 0 20px 0;
    }

    .info-label {
        min-width: auto;
        margin-bottom: 5px;
        font-size: 0.8rem;
        font-weight: 700;
        color: var(--primary-color, #2c3e50);
    }

    .info-value {
        font-size: 0.85rem;
        line-height: 1.6;
        padding-left: 24px;
        position: relative;
    }

    .info-label i {
        display: none; /* Hide icons on mobile for cleaner look */
    }

    /* Section adjustments */
    .section-header {
        padding: 15px;
    }

    .section-content {
        padding: 15px;
    }

    /* Card adjustments */
    .info-card-horizontal {
        margin-bottom: 20px;
    }

    .info-card-header {
        padding: 15px;
    }

    .info-card-content {
        padding: 15px;
    }

    /* Overlay for mobile sidebar */
    .mobile-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0,0,0,0.5);
        z-index: 1000;
    }

    .mobile-overlay.active {
        display: block;
    }
}

/* Small mobile devices (< 480px) */
@media (max-width: 480px) {
    .tracking-content {
        padding: 60px 10px 10px;
    }

    .section-header,
    .section-content,
    .info-card-header,
    .info-card-content {
        padding: 12px;
    }

    .info-value {
        font-size: 0.85rem;
    }
}

/* ============================================
   PHASE 5: VISUAL POLISH & MICRO-INTERACTIONS
   ============================================ */

/* Smooth transitions for better UX */
.info-section {
    transition: all 0.3s ease;
}

.info-section:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.section-icon {
    transition: all 0.3s ease;
}

.section-icon:hover {
    transform: scale(1.1);
    background: rgba(44, 62, 80, 0.15);
}

/* Enhanced loading states */
.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid rgba(44, 62, 80, 0.1);
    border-top: 4px solid var(--primary-color, #2c3e50);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    text-align: center;
    color: #718096;
    font-size: 0.9rem;
    margin-top: 10px;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0.6; }
    50% { opacity: 1; }
}

/* Enhanced success states */
.success-message {
    background: linear-gradient(135deg, #f0fff4 0%, #e6fffa 100%);
    border: 1px solid #c6f6d5;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    color: #22543d;
    font-weight: 500;
    margin: 15px 0;
    animation: slideInUp 0.4s ease;
}

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

/* Enhanced error states */
.tracking-error {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
    border: 1px solid #feb2b2;
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    color: #c53030;
    font-weight: 500;
    margin: 15px 0;
    animation: shake 0.5s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

/* Interactive feedback for info rows */
.info-row {
    position: relative;
    transition: all 0.2s ease;
}

.info-row::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 0;
    background: var(--primary-color, #2c3e50);
    opacity: 0.1;
    transition: width 0.3s ease;
}

.info-row:hover::before {
    width: 3px;
}

/* Enhanced badge animations */
.notification-badge {
    animation: badgePulse 2s ease-in-out infinite;
}

@keyframes badgePulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* Smooth scroll behavior */
html {
    scroll-behavior: smooth;
}

/* Enhanced button interactions */
.search-button {
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.search-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease;
}

.search-button:active::before {
    width: 200px;
    height: 200px;
}

/* Card entrance animations */
.result-container > * {
    animation: fadeInUp 0.6s ease backwards;
}

.result-container > *:nth-child(1) { animation-delay: 0.1s; }
.result-container > *:nth-child(2) { animation-delay: 0.2s; }
.result-container > *:nth-child(3) { animation-delay: 0.3s; }
.result-container > *:nth-child(4) { animation-delay: 0.4s; }
.result-container > *:nth-child(5) { animation-delay: 0.5s; }

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

/* Progress indicators */
.progress-indicator {
    width: 100%;
    height: 4px;
    background: #e2e8f0;
    border-radius: 2px;
    overflow: hidden;
    margin: 10px 0;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color, #2c3e50) 0%, var(--secondary-color, #e74c3c) 100%);
    border-radius: 2px;
    transition: width 0.8s ease;
    animation: progressGlow 2s ease-in-out infinite;
}

@keyframes progressGlow {
    0%, 100% { box-shadow: 0 0 5px rgba(44, 62, 80, 0.3); }
    50% { box-shadow: 0 0 15px rgba(44, 62, 80, 0.6); }
}

/* Enhanced modal animations */
.modal.show .modal-content {
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: scale(0.9) translateY(-20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Focus states for accessibility */
.search-input:focus,
.nav-icon:focus,
.mobile-menu-toggle:focus {
    outline: 2px solid var(--primary-color, #2c3e50);
    outline-offset: 2px;
}

/* Enhanced tooltip animations */
.nav-icon::after {
    transition: all 0.3s ease;
    transform-origin: left center;
}

.nav-icon:hover::after {
    transform: translateY(-50%) scale(1.05);
}

/* Print styles */
@media print {
    .track-sidebar,
    .mobile-menu-toggle,
    .mobile-overlay {
        display: none !important;
    }

    .tracking-content {
        margin-left: 0 !important;
    }

    .info-section {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

.section-title {
    font-size: 1rem;
    font-weight: 700;
    color: #1A202C;
    margin: 0;
    letter-spacing: -0.02em;
}

.info-group {
    margin-bottom: 15px;
}

.info-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: #718096;
    margin-bottom: 5px;
}

.info-value {
    font-size: 0.875rem;
    color: #1A202C;
    font-weight: 500;
}

.shipment-details-section {
    padding: 20px;
    border-bottom: 1px solid #E2E8F0;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

/* Timeline Styling */
.shipment-timeline {
    padding: 20px;
    position: relative;
    padding-left: 50px;
}

.timeline-track {
    position: absolute;
    left: 30px;
    top: 60px;
    bottom: 20px;
    width: 2px;
    background-color: #E2E8F0;
}

.timeline-event {
    position: relative;
    margin-bottom: 25px;
    padding-bottom: 5px;
}

.timeline-event:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}

.event-dot {
    position: absolute;
    left: -30px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background-color: #FFFFFF;
    border: 2px solid #CBD5E0;
    z-index: 1;
}

.event-dot.active {
    border-color: #333333;
    background-color: #333333;
}

.event-content {
    padding-left: 10px;
}

.event-date {
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 5px;
}

.event-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: #1A202C;
    margin-bottom: 5px;
}

.event-location {
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 5px;
}

.event-message {
    font-size: 0.75rem;
    color: #718096;
    font-style: italic;
}

.no-events {
    color: #718096;
    font-style: italic;
    margin-top: 15px;
}

/* Tracking Link */
.tracking-link {
    margin-top: 20px;
    text-align: center;
}

.view-details-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    background-color: #333333;
    color: #ffffff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 0.9rem;
    transition: background-color 0.2s;
}

.view-details-link:hover {
    background-color: #555555;
}
body { font-family: sans-serif; line-height: 1.6; margin: 0; padding: 20px; }
.container { max-width: 800px; margin: 0 auto; }
.hero { text-align: center; padding: 40px 0; }
.cta-button { display: inline-block; padding: 10px 20px; background: #007bff; color: #fff; text-decoration: none; border-radius: 5px; margin: 10px; }
.cta-button:hover { background: #0056b3; }
