﻿/* Please see documentation at https://docs.microsoft.com/aspnet/core/client-side/bundling-and-minification
for details on configuring this project to bundle and minify static web assets. */

a.navbar-brand {
    white-space: normal;
    text-align: center;
    word-break: break-all;
}

.navbar-color {
    background-color: white;
    border-color: white;
}

/* Provide sufficient contrast against white background */
a {
    color: blue;
}

    a:hover, a:active {
        color: darkblue;
    }

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.nav-pills .nav-link.active, .nav-pills .show > .nav-link {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.active {
    text-decoration-color: red;
}

/* Modal & Notification Styles
--------------------------------------------------- */

.modal-content {
    box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3);
    position: center;
    top: 1px;
    margin-bottom: 50px;
    padding: 0;
    border-radius: 5px;
    border: 1px solid #404040;
    background-color: #f1f1f1;
}

    .modal-content .modal-header {
        background: #707070;
        color: #FFF;
    }

        .modal-content .modal-header .modal-title {
            font-weight: 600;
        }

    .modal-content .prompt-footer {
        padding: 15px;
        text-align: center;
    }

    .modal-content .prompt-button {
        box-shadow: 0px 0px 20px 0px rgba(0, 0, 0, 0.3);
        display: inline-block;
        width: 150px;
        margin: 0 20px;
        padding: 10px;
        border-radius: 5px;
        font-size: 18px;
        background-color: #707070;
        text-align: center;
        color: #FFF;
        margin-top: 10px;
    }

    .modal-content .prompt-button-confirm {
        color: lightblue;
    }

    .modal-content .prompt-button-confirm-disabled {
        color: lightblue;
        opacity: 0.35;
    }

    .modal-content .prompt-button-cancel {
        color: red;
    }

    .modal-content .prompt-button-text {
        margin-left: 10px;
        font-weight: 100;
        color: #FFF;
    }

    .modal-content .prompt-button-text-disabled {
        margin-left: 10px;
        font-weight: 100;
        color: #FFF;
        opacity: 0.35;
    }

.notification {
    position: fixed;
    z-index: 999999999999999;
    background: #ffffe0;
    top: 50px;
    right: 20px;
    width: 40%;
    margin: 10px;
    padding: 15px;
    border-radius: 5px;
    box-shadow: 4px 0px 5px #CCC;
    color: #000000;
    border: 1px solid #404040;
    display: none;
}

    .notification .fas {
        color: #000000;
        padding-right: 3px;
    }

/* Sticky footer styles
-------------------------------------------------- */
html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.border-top {
    border-top: 1px solid #e5e5e5;
}

.border-bottom {
    border-bottom: 1px solid #e5e5e5;
}

.box-shadow {
    box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05);
}

button.accept-policy {
    font-size: 1rem;
    line-height: inherit;
}

/* Sticky footer styles
-------------------------------------------------- */
html {
    position: relative;
    min-height: 100%;
}

body {
    /* Margin bottom by footer height */
    margin-bottom: 60px;
}

.footer {
    position: absolute;
    bottom: 0;
    width: 100%;
    white-space: nowrap;
    line-height: 60px; /* Vertically center the text there */
}

/* My CSS */
.here-map {
    width: 100%;
    /* Firefox */
    height: -moz-calc(100% - 58px);
    /* WebKit */
    height: -webkit-calc(100% - 58px);
    /* Opera */
    height: -o-calc(100% - 58px);
    /* Standard */
    height: calc(100% - 58px);
    min-height: 710px;
    position: absolute;
    top: 58px;
}

.input-group {
    position: relative;
    display: -ms-flexbox;
    display: flex;
    -ms-flex-wrap: wrap;
    flex-wrap: wrap;
    -ms-flex-align: stretch;
    align-items: stretch;
    width: 100%;
}

.input-group-append {
    display: -ms-flexbox;
    display: flex;
}

.input-group-button {
    display: -ms-flexbox;
    display: flex;
    -ms-flex-align: center;
    align-items: center;
    padding: .375rem .75rem;
    margin-bottom: 0;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    text-align: center;
    white-space: nowrap;
    background-color: #e9ecef;
    border: 1px solid #ced4da;
    border-radius: .25rem;
}

.form-control {
    display: block;
    width: 100%;
    height: calc(1.5em + .75rem + 2px);
    padding: .375rem .75rem;
    font-size: 1rem;
    font-weight: 400;
    line-height: 1.5;
    color: #495057;
    background-color: #fff;
    background-clip: padding-box;
    border: 1px solid #ced4da;
    border-radius: .25rem;
    transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out;
}

.jobs-panel {
    background-color: white;
    border: 2px solid black;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 8px;
    padding: 6px;
}

.job-data {
    background-color: white;
    border: 2px solid black;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 8px;
    padding: 6px;
}

.flight-data {
    background-color: white;
    border: 2px solid black;
    border-radius: 12px;
    overflow: hidden;
    margin-top: 8px;
    padding: 6px;
}

/* Claude CSS */

.sidebar {
    width: 350px;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

.section {
    margin-bottom: 16px;
    background-color: white;
    border-radius: 8px;
    overflow: hidden;
}

    .section:last-child {
        margin-bottom: 0;
    }

.section-header {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    background-color: #0078d4;
    color: white;
    font-weight: 600;
    font-size: 16px;
}

    .section-header i {
        margin-right: 8px;
        font-size: 18px;
    }

.section-content {
    padding: 16px;
}

.data-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    align-items: center;
}

    .data-row:last-child {
        margin-bottom: 0;
    }

.data-label {
    color: #555;
    font-size: 14px;
}

.data-value {
    font-weight: 500;
    color: #333;
    font-size: 14px;
}

.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    background-color: #e6f7ff;
    color: #0078d4;
}

.status-in-flight {
    background-color: #e6f7ff;
    color: #0078d4;
}

.status-picked-up {
    background-color: #ebf9eb;
    color: #237923;
}

.time-badge {
    background-color: #f0f0f0;
    padding: 4px 10px;
    border-radius: 4px;
    color: #333;
    font-weight: 500;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ddd;
}

.tab {
    padding: 12px 16px;
    font-size: 14px;
    font-weight: 500;
    color: #555;
    cursor: pointer;
    position: relative;
}

    .tab.active {
        color: #0078d4;
    }

        .tab.active:after {
            content: '';
            position: absolute;
            bottom: -1px;
            left: 0;
            width: 100%;
            height: 3px;
            background-color: #0078d4;
        }

.flight-number {
    display: flex;
    align-items: center;
    background-color: #f8f9fa;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 16px;
}

    .flight-number i {
        margin-right: 8px;
        color: #0078d4;
    }

.flight-number-value {
    font-weight: 600;
    color: #333;
    font-size: 16px;
}

.timeline {
    display: flex;
    flex-direction: column;
    padding-left: 24px;
    position: relative;
}

    .timeline:before {
        content: '';
        position: absolute;
        left: 8px;
        top: 8px;
        bottom: 8px;
        width: 2px;
        background-color: #ddd;
    }

.timeline-item {
    position: relative;
    margin-bottom: 20px;
}

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

.timeline-dot {
    position: absolute;
    left: -24px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #0078d4;
}

    .timeline-dot.completed {
        background-color: #28a745;
    }

    .timeline-dot.current {
        background-color: #0078d4;
        box-shadow: 0 0 0 4px rgba(0, 120, 212, 0.2);
    }

    .timeline-dot.pending {
        background-color: #ddd;
    }

.timeline-content {
    margin-left: 8px;
}

.timeline-time {
    font-size: 12px;
    color: #777;
    margin-bottom: 2px;
}

.timeline-label {
    font-weight: 500;
    color: #333;
}

.separator {
    height: 1px;
    background-color: #eaeaea;
    margin: 16px 0;
}

.delivery-stages {
    padding-left: 8px;
}

.stage-row {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.stage-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: #ddd;
    margin-right: 8px;
}

    .stage-dot.active {
        background-color: #28a745;
    }

.stage-text {
    font-size: 14px;
    color: #555;
}

    .stage-text.active {
        font-weight: 500;
        color: #333;
    }

/* Mobile Tracking Page Styles */
.mobile-tracking-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #334155;
}

/* Only apply mobile background on small screens */
@media (max-width: 767px) {
    .mobile-tracking-container {
        background: #f8fafc;
        min-height: 100vh;
    }
}

/* Responsive Logo Sizing */
.logo {
    cursor: pointer;
    max-width: 227px;
    height: 50px;
    object-fit: contain; /* Ensures logo maintains aspect ratio */
}

/* Mobile logo adjustments */
@media (max-width: 767px) {
    .logo {
        max-width: 180px; /* Smaller on mobile */
        height: 40px; /* Proportionally smaller height */
    }
}

/* Very small mobile screens */
@media (max-width: 480px) {
    .logo {
        max-width: 150px; /* Even smaller on very small screens */
        height: 35px;
    }
}

/* Extra small screens */
@media (max-width: 360px) {
    .logo {
        max-width: 120px; /* Smallest size for very narrow screens */
        height: 30px;
    }
}

/* Desktop Search - Hide on mobile, show on desktop */
@media (max-width: 767px) {
    .desktop-search {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .desktop-search {
        display: block !important;
        position: fixed;
        top: 58px;
        left: 8px;
        z-index: 1000;
        background: white;
        border-radius: 16px;
        padding: 0;
        box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
        max-width: 380px;
        min-width: 350px;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

        /* Desktop Search Header */
        .desktop-search .input-group {
            background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
            padding: 1.5rem;
            border-radius: 16px 16px 0 0;
            margin: 0;
            display: flex;
            align-items: center;
            gap: 8px;
        }

            .desktop-search .input-group .form-control {
                background: rgba(255,255,255,0.95);
                border: none;
                border-radius: 12px;
                padding: 0.875rem 1rem;
                font-size: 16px;
                backdrop-filter: blur(10px);
                box-shadow: 0 4px 15px rgba(0,0,0,0.1);
                color: #334155;
                transition: all 0.3s ease;
                flex: 1;
                height: auto;
                min-height: 44px;
            }

                .desktop-search .input-group .form-control:focus {
                    background: white;
                    transform: translateY(-1px);
                    box-shadow: 0 8px 25px rgba(0,0,0,0.15);
                    outline: none;
                }

            .desktop-search .input-group .input-group-append {
                margin: 0;
                display: flex;
                align-items: center;
            }

            .desktop-search .input-group .input-group-button {
                background: #059669;
                border: none;
                border-radius: 12px;
                color: white;
                font-weight: 600;
                padding: 0.875rem 1.5rem;
                transition: all 0.2s ease;
                margin: 0;
                height: 44px;
                display: flex;
                align-items: center;
                justify-content: center;
                min-width: 80px;
            }

                .desktop-search .input-group .input-group-button:hover {
                    background: #047857;
                    transform: translateY(-1px);
                    box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
                }

        /* Desktop Error State */
        .desktop-search .jobs-panel {
            background: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 12px;
            margin: 1rem;
            padding: 1rem;
            text-align: center;
            color: #dc2626;
            font-weight: 500;
        }

            /* Desktop Delivery Panel */
            .desktop-search .jobs-panel:not([style*="text-align:center"]) {
                background: white;
                border: none;
                border-radius: 0;
                margin: 0;
                padding: 1.5rem;
                border-bottom: 1px solid #f1f5f9;
            }

            .desktop-search .jobs-panel label {
                font-weight: 600;
                color: #1e293b;
                margin-bottom: 0.75rem;
                display: block;
                font-size: 1rem;
            }

            .desktop-search .jobs-panel > div[ng-click] {
                background: #f8fafc;
                border: 2px solid transparent;
                border-radius: 12px;
                padding: 0.875rem 1rem;
                margin: 0.5rem 0;
                cursor: pointer;
                transition: all 0.2s ease;
                font-weight: 500;
                color: #64748b;
                border-left: 4px solid #e2e8f0;
            }

                .desktop-search .jobs-panel > div[ng-click]:hover {
                    background: #f1f5f9;
                    transform: translateX(2px);
                    border-left-color: #0ea5e9;
                    color: #0ea5e9;
                }

        /* Desktop Job Data Panel */
        .desktop-search .job-data {
            background: white;
            border: none;
            border-radius: 0;
            margin: 0;
            padding: 0;
            overflow: visible;
        }

            .desktop-search .job-data > div:first-child {
                background: #f8fafc;
                padding: 1rem 1.5rem;
                border-bottom: 1px solid #e2e8f0;
                margin: 0;
            }

                .desktop-search .job-data > div:first-child label {
                    font-weight: 600;
                    color: #1e293b;
                    margin: 0;
                    display: flex;
                    align-items: center;
                    gap: 0.5rem;
                }

                    .desktop-search .job-data > div:first-child label:before {
                        content: "📋";
                        font-size: 1.2em;
                    }

            .desktop-search .job-data > div:not(:first-child) {
                padding: 0.75rem 1.5rem;
                border-bottom: 1px solid #f1f5f9;
                margin: 0;
                display: flex;
                justify-content: space-between;
                align-items: flex-start;
                gap: 1rem;
            }

            .desktop-search .job-data > div:last-child {
                border-bottom: none;
            }

            .desktop-search .job-data > div:not(:first-child):before {
                content: attr(data-label);
                color: #64748b;
                font-size: 0.875rem;
                flex-shrink: 0;
                min-width: 80px;
            }

        /* Flight Data Panel */
        .desktop-search .flight-data {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            border: none;
            border-radius: 16px;
            margin: 1rem;
            padding: 0;
            overflow: hidden;
        }

            .desktop-search .flight-data > div:first-child {
                background: transparent;
                padding: 1rem 1.5rem;
                border-bottom: 1px solid rgba(255,255,255,0.3);
                margin: 0;
            }

                .desktop-search .flight-data > div:first-child label {
                    font-weight: 700;
                    color: #1e40af;
                    margin: 0;
                    display: flex;
                    align-items: center;
                    gap: 0.5rem;
                }

                    .desktop-search .flight-data > div:first-child label:before {
                        content: "✈️";
                        font-size: 1.2em;
                    }

            .desktop-search .flight-data > div:not(:first-child) {
                padding: 0.75rem 1.5rem;
                margin: 0;
                background: rgba(255,255,255,0.2);
                backdrop-filter: blur(10px);
                display: flex;
                justify-content: space-between;
                align-items: center;
                color: #1e40af;
                font-weight: 500;
            }

        /* Delivery Photo Styling */
        .desktop-search .pod-image {
            max-height: 200px !important;
            border-radius: 8px;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            margin-top: 0.5rem;
        }

        /* Scrollbar Styling */
        .desktop-search::-webkit-scrollbar {
            width: 6px;
        }

        .desktop-search::-webkit-scrollbar-track {
            background: #f1f5f9;
            border-radius: 3px;
        }

        .desktop-search::-webkit-scrollbar-thumb {
            background: #cbd5e1;
            border-radius: 3px;
        }

            .desktop-search::-webkit-scrollbar-thumb:hover {
                background: #94a3b8;
            }
}

/* Hide mobile components on desktop */
@media (min-width: 768px) {
    .mobile-header {
        display: none;
    }

    .main-content {
        display: none;
    }

    .fab {
        display: none;
    }

    .tracking-card,
    .details-card,
    .flight-card,
    .photo-card,
    .error-state {
        display: none;
    }
}

/* Mobile Header Styles - Only show on mobile */
@media (max-width: 767px) {
    .mobile-header {
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
        color: white;
        padding: 1rem;
        position: fixed;
        top: 58px; /* Position below the existing top bar */
        left: 0;
        right: 0;
        z-index: 100;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    }

    /* Add top margin to main content to account for both headers */
    .main-content {
        margin-top: 138px; /* 58px (top bar) + 80px (mobile header) */
    }
}

.search-container {
    position: relative;
    display: flex;
    gap: 8px;
}

.mobile-search-input {
    flex: 1;
    padding: 0.875rem 1rem;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    color: #334155;
}

    .mobile-search-input:focus {
        outline: none;
        background: white;
        transform: translateY(-1px);
        box-shadow: 0 8px 25px rgba(0,0,0,0.15);
    }

    .mobile-search-input::placeholder {
        color: #64748b;
    }

.mobile-search-btn {
    background: #059669;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    color: white;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 16px;
    white-space: nowrap;
}

    .mobile-search-btn:hover {
        background: #047857;
        transform: translateY(-1px);
        box-shadow: 0 4px 15px rgba(5, 150, 105, 0.3);
    }

    .mobile-search-btn:disabled {
        opacity: 0.7;
        cursor: not-allowed;
        transform: none;
    }

/* Error State */
.error-state {
    text-align: center;
    padding: 3rem 2rem;
    color: #64748b;
}

.error-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1rem;
    color: #ef4444;
}

.error-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: #1e293b;
}

.error-message {
    font-size: 1rem;
    color: #64748b;
}

/* Main Content - Mobile First */
.main-content {
    position: relative;
}

/* Map Container - Mobile styles */
@media (max-width: 767px) {
    .mobile-map-container {
        height: 50vh; /* Fixed height - not taking full page */
        min-height: 300px;
        background: linear-gradient(45deg, #e0f2fe 0%, #bae6fd 100%);
        position: relative;
        overflow: hidden;
        border-radius: 0 0 24px 24px;
        transition: all 0.3s ease;
    }

        .mobile-map-container.expanded {
            height: 70vh;
            border-radius: 0;
        }

    /* Main content flows normally */
    .main-content {
        margin-top: 138px; /* 58px (top bar) + 80px (mobile header) */
        background: #f8fafc;
        min-height: calc(100vh - 138px);
    }
}

/* Hide mobile map container on desktop, preserve original map */
@media (min-width: 768px) {
    .mobile-map-container {
        display: none;
    }
}

.mobile-map-container .here-map {
    width: 100%;
    height: 100%;
    border-radius: inherit;
}

.map-toggle-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border: none;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    z-index: 10;
}

    .map-toggle-btn:hover {
        background: white;
        transform: scale(1.1);
    }

/* Tracking Card */
.tracking-card {
    background: white;
    box-shadow: 0 10px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

.status-header {
    padding: 1rem 1.5rem; /* Reduced from 1.5rem */
    text-align: center;
    position: relative;
    color: white;
}

    .status-header.status-prebook {
        background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    }

    .status-header.status-in-transit {
        background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
    }

    .status-header.status-delivered {
        background: linear-gradient(135deg, #059669 0%, #047857 100%);
    }

    .status-header.status-default {
        background: linear-gradient(135deg, #6b7280 0%, #4b5563 100%);
    }

.status-badge {
    display: inline-block;
    background: rgba(255,255,255,0.2);
    padding: 0.375rem 0.75rem; /* Reduced from 0.5rem 1rem */
    border-radius: 16px; /* Reduced from 20px */
    font-size: 0.75rem; /* Reduced from 0.875rem */
    font-weight: 600;
    margin-bottom: 0.375rem; /* Reduced from 0.5rem */
    backdrop-filter: blur(10px);
}

.job-number {
    font-size: 1.25rem; /* Reduced from 1.5rem */
    font-weight: 700;
    margin-bottom: 0.375rem; /* Reduced from 0.5rem */
}

.delivery-time {
    font-size: 0.875rem; /* Reduced from 1rem */
    opacity: 0.9;
}

/* Single Job Details in Status Header */
.single-job-details {
    margin-top: 0.75rem;
}

.detail-separator {
    height: 1px;
    background: rgba(255,255,255,0.2);
    margin: 0.75rem 0;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

    .summary-row:last-child {
        margin-bottom: 0;
    }

.summary-label {
    font-size: 0.75rem;
    opacity: 0.8;
    font-weight: 500;
}

.summary-value {
    font-size: 0.75rem;
    font-weight: 600;
    text-align: right;
}

/* Progress Section */
.progress-section {
    padding: 1rem 1.5rem; /* Reduced from 1.5rem */
}

.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem; /* Reduced from 1rem */
}

.progress-title {
    font-weight: 600;
    color: #1e293b;
    font-size: 0.875rem; /* Added smaller font size */
}

.expand-btn {
    background: none;
    border: none;
    color: #0ea5e9;
    cursor: pointer;
    font-weight: 600;
    padding: 0.5rem;
    border-radius: 6px;
    transition: all 0.2s ease;
}

    .expand-btn:hover {
        background: #f0f9ff;
        color: #0284c7;
    }

/* Delivery Stages */
.delivery-stages {
    display: flex;
    flex-direction: column;
    gap: 0.5rem; /* Reduced from 0.75rem */
}

.stage-item {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Reduced from 1rem */
    padding: 0.75rem; /* Reduced from 1rem */
    background: #f8fafc;
    border-radius: 10px; /* Reduced from 12px */
    cursor: pointer;
    transition: all 0.2s ease;
    border-left: 3px solid transparent; /* Reduced from 4px */
    min-height: 50px; /* Reduced from 60px */
}

    .stage-item:hover {
        background: #f1f5f9;
        transform: translateX(2px);
    }

    .stage-item.active {
        background: #ecfdf5;
        border-left-color: #059669;
    }

    .stage-item.completed {
        background: #f0fdf4;
        border-left-color: #22c55e;
    }

    /* Parent Job Styling */
    .stage-item.parent-job {
        background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
        border-left-color: #0ea5e9;
        border-width: 4px;
        margin-bottom: 0.5rem;
        position: relative;
    }

        .stage-item.parent-job:hover {
            background: linear-gradient(135deg, #e0f2fe 0%, #bae6fd 100%);
            transform: translateX(2px);
        }

        .stage-item.parent-job.active {
            background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
            border-left-color: #0284c7;
            box-shadow: 0 4px 15px rgba(14, 165, 233, 0.2);
        }

        .stage-item.parent-job::before {
            content: '';
            position: absolute;
            top: -1px;
            left: -1px;
            right: -1px;
            bottom: -1px;
            background: linear-gradient(135deg, #0ea5e9, #0284c7);
            border-radius: 12px;
            z-index: -1;
            opacity: 0;
            transition: opacity 0.3s ease;
        }

        .stage-item.parent-job.active::before {
            opacity: 0.1;
        }

.parent-dot {
    background: #0ea5e9 !important;
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2) !important;
    position: relative;
}

    .parent-dot::after {
        content: '🏠';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        font-size: 8px;
        line-height: 1;
    }

.stage-item.parent-job .stage-text {
    color: #0284c7;
    font-weight: 700;
}

.stage-item.parent-job .stage-status {
    color: #0ea5e9;
    font-weight: 600;
}

.stage-item.parent-job .stage-arrow {
    color: #0ea5e9;
    font-size: 1.5rem;
}

.stage-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.stage-item.active .stage-dot {
    background: #059669;
    box-shadow: 0 0 0 4px rgba(5, 150, 105, 0.2);
}

.stage-item.completed .stage-dot {
    background: #22c55e;
    box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2);
}

.stage-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.125rem; /* Reduced from 0.25rem */
}

.stage-text {
    font-weight: 600;
    color: #64748b;
    font-size: 0.875rem; /* Reduced from 1rem */
}

.stage-status {
    font-size: 0.75rem; /* Reduced from 0.875rem */
    color: #94a3b8;
}

.stage-item.active .stage-text {
    color: #059669;
}

.stage-item.active .stage-status {
    color: #047857;
}

.stage-item.completed .stage-text {
    color: #22c55e;
}

.stage-item.completed .stage-status {
    color: #16a34a;
}

.stage-arrow {
    color: #cbd5e1;
    font-size: 1.25rem;
    font-weight: 300;
}

.stage-item.active .stage-arrow,
.stage-item.completed .stage-arrow {
    color: #059669;
}

/* Details Card */
.details-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.details-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.details-icon {
    width: 20px;
    height: 20px;
    color: #0ea5e9;
}

.details-title {
    font-weight: 600;
    color: #1e293b;
}

.details-content {
    padding: 1.5rem;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #f1f5f9;
    gap: 1rem;
}

    .detail-row:last-child {
        border-bottom: none;
    }

.detail-label {
    color: #64748b;
    font-size: 0.875rem;
    flex-shrink: 0;
    min-width: 80px;
}

.detail-value {
    font-weight: 600;
    color: #1e293b;
    text-align: right;
    word-break: break-word;
}

/* Flight Card */
.flight-card {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-radius: 16px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.flight-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.flight-icon {
    width: 24px;
    height: 24px;
    color: #0ea5e9;
}

.flight-number {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e40af;
}

.flight-timeline {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}

.flight-point {
    text-align: center;
    flex: 1;
    min-width: 80px;
}

.flight-time {
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 0.25rem;
    font-size: 1rem;
}

.flight-location {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}

.flight-timezone {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-top: 0.25rem;
}

.flight-progress {
    height: 6px;
    background: rgba(255,255,255,0.5);
    border-radius: 3px;
    flex: 2;
    position: relative;
    overflow: hidden;
    margin: 0 1rem;
}

.flight-progress-bar {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
    position: relative;
}

    .flight-progress-bar.not-started {
        width: 0%;
        background: #cbd5e1;
    }

    .flight-progress-bar.in-progress {
        width: 65%;
        background: #0ea5e9;
        animation: pulse 2s infinite;
    }

    .flight-progress-bar.completed {
        width: 100%;
        background: #22c55e;
    }

/* Photo Card */
.photo-card {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.photo-header {
    background: #f8fafc;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.photo-icon {
    width: 20px;
    height: 20px;
    color: #0ea5e9;
}

.photo-title {
    font-weight: 600;
    color: #1e293b;
}

.photo-content {
    padding: 1rem;
}

.delivery-photo {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* Floating Action Button */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 56px;
    height: 56px;
    background: #059669;
    border-radius: 50%;
    border: none;
    color: white;
    font-size: 1.5rem;
    box-shadow: 0 8px 25px rgba(5, 150, 105, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

    .fab:hover {
        transform: scale(1.1);
        box-shadow: 0 12px 35px rgba(5, 150, 105, 0.4);
    }

/* Animations */
.animate-slide-up {
    animation: slideUp 0.5s ease forwards;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

    50% {
        opacity: 0.7;
    }
}

/* Loading States */
.loading-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
    border-radius: 4px;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }

    100% {
        background-position: -200% 0;
    }
}

/* Responsive Design - Mobile Only */
@media (max-width: 767px) {
    /* Mobile-only styles */
    .tracking-card {
        background: white;
        margin: -12px 1rem 1rem; /* Reduced negative margin */
        border-radius: 20px;
        box-shadow: 0 10px 40px rgba(0,0,0,0.1);
        overflow: hidden;
        position: relative;
        z-index: 10;
    }

    .details-card, .flight-card, .photo-card {
        background: white;
        border-radius: 16px;
        overflow: hidden;
        box-shadow: 0 4px 20px rgba(0,0,0,0.08);
        margin: 1rem;
        position: relative; /* Ensure normal document flow */
        z-index: 10;
    }

    .error-state {
        display: block;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .mobile-tracking-container {
        background: #0f172a;
        color: #e2e8f0;
    }

    .tracking-card, .details-card, .photo-card {
        background: #1e293b;
    }

    .details-header, .photo-header {
        background: #334155;
        border-bottom-color: #475569;
    }

    .detail-row {
        border-bottom-color: #334155;
    }

    .stage-item {
        background: #334155;
    }

        .stage-item:hover {
            background: #475569;
        }

        .stage-item.active {
            background: #064e3b;
        }

        .stage-item.completed {
            background: #14532d;
        }

    .mobile-search-input {
        background: rgba(30, 41, 59, 0.9);
        color: #e2e8f0;
    }

        .mobile-search-input::placeholder {
            color: #94a3b8;
        }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .stage-item {
        border: 2px solid #64748b;
    }

        .stage-item.active {
            border-color: #059669;
        }

        .stage-item.completed {
            border-color: #22c55e;
        }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Photo Modal Styles */
.photo-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    cursor: pointer;
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

.photo-modal-container {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    cursor: default;
    overflow: hidden;
    animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    cursor: pointer;
    z-index: 10001;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

    .modal-close-btn:hover {
        background: rgba(0, 0, 0, 0.9);
        transform: scale(1.1);
    }

    .modal-close-btn:active {
        transform: scale(0.95);
    }

.modal-photo-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    min-height: 300px;
}

.modal-photo-image {
    max-width: 100%;
    max-height: 70vh;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.modal-photo-info {
    padding: 20px;
    background: white;
    text-align: center;
    border-top: 1px solid #e5e7eb;
}

/* Thumbnail Styles */
.delivery-photo-thumb:hover {
    transform: scale(1.05);
    border-color: #0088cc !important;
    box-shadow: 0 4px 12px rgba(0, 136, 204, 0.3);
}

.delivery-photo-thumb:active {
    transform: scale(0.98);
}

/* Desktop thumbnail specific */
.pod-thumbnail {
    display: inline-block;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .photo-modal-container {
        max-width: 95%;
        max-height: 95vh;
    }

    .modal-photo-wrapper {
        padding: 15px;
    }

    .modal-photo-image {
        max-height: 60vh;
    }

    .modal-close-btn {
        top: 10px;
        right: 10px;
        width: 40px;
        height: 40px;
    }
}