/**
 * Upjau Extended - Tracking Page Styles
 * Two-column responsive design with shipments list on left and tracking details on right
 */

/* Force styles to override theme - use high specificity */
.upjau-tracking-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: visible;
}

/* Header */
.upjau-tracking-header {
    text-align: center;
    margin-bottom: 40px;
}

.upjau-tracking-header h2 {
    font-size: 32px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 10px 0;
}

.upjau-tracking-breadcrumb {
    font-size: 14px;
    color: #666;
}

.upjau-tracking-breadcrumb .breadcrumb-separator {
    margin: 0 8px;
}

.upjau-tracking-breadcrumb .breadcrumb-current {
    color: #1a1a1a;
}

/* Single View (Order Input for non-logged in) */
.upjau-tracking-view {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

/* Order Details View (First Section - Single Panel) */
.upjau-order-details-view {
    margin-bottom: 30px;
}

.upjau-order-details-container {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

.upjau-order-details-content {
    margin-top: 20px;
}

/* Ensure order details content styles are applied with high specificity */
.upjau-tracking-container .upjau-order-details-content .upjau-order-status-header {
    border-bottom: 2px solid #eee !important;
    padding-bottom: 20px !important;
    margin-bottom: 30px !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-status-header h3 {
    font-size: 24px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 0 15px 0 !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-info-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)) !important;
    gap: 15px !important;
    margin-top: 15px !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-info-item {
    font-size: 14px !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-info-label {
    color: #666 !important;
    margin-bottom: 4px !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-info-value {
    font-size: 16px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
}

/* Hide empty EDD placeholder to prevent layout issues */
.upjau-tracking-container .upjau-order-details-content #upjau-edd-placeholder:empty {
    display: none !important;
}

/* WooCommerce price formatting fix in order details */
.upjau-order-details-content .upjau-order-info-value .woocommerce-Price-amount {
    display: inline;
}

.upjau-order-details-content .upjau-order-info-value .woocommerce-Price-amount bdi {
    display: inline;
    white-space: nowrap;
}

.upjau-order-details-content .upjau-order-info-value .woocommerce-Price-currencySymbol {
    display: inline;
}

/* ============================================
   ORDER LIST (First Screen)
   ============================================ */

.upjau-order-list-container h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 20px 0;
    color: #1a1a1a;
}

.upjau-order-list {
    display: grid;
    gap: 15px;
}

.upjau-order-card {
    background: linear-gradient(90deg, #f0f8f2 0%, #ffffff 100%);
    border: 2px solid #16892f;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    transition: all 0.3s ease;
}

.upjau-order-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 16px rgba(22, 137, 47, 0.25);
    border-color: #f9d923;
}

.upjau-order-card-info {
    flex: 1;
}

.upjau-order-card-info h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
    font-weight: 600;
    color: #16892f;
}

.upjau-order-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    font-size: 13px;
    color: #555;
}

.upjau-order-card-meta-item {
    display: flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.7);
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid rgba(22, 137, 47, 0.15);
    font-weight: 500;
}

.upjau-order-card-meta-item .meta-icon {
    font-size: 16px;
    line-height: 1;
    opacity: 0.8;
}

.upjau-order-card-meta-item .meta-value {
    color: #1a1a1a;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

/* WooCommerce price formatting fix */
.upjau-order-card-meta-item .meta-value .woocommerce-Price-amount {
    display: inline;
}

.upjau-order-card-meta-item .meta-value .woocommerce-Price-amount bdi {
    display: inline;
    white-space: nowrap;
}

.upjau-order-card-meta-item .meta-value .woocommerce-Price-currencySymbol {
    display: inline;
}

/* Legacy support for old span structure */
.upjau-order-card-meta span:not(.upjau-order-card-meta-item) {
    display: flex;
    align-items: center;
    gap: 5px;
}

.upjau-order-card-status {
    display: inline-block;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: capitalize;
    white-space: nowrap;
}

/* Order Status Colors */
.upjau-order-card-status.pending,
.upjau-order-card-status.on-hold {
    background: linear-gradient(135deg, #fff3cd 0%, #ffe69c 100%);
    color: #856404;
    border: 1px solid #ffc107;
}

.upjau-order-card-status.processing {
    background: linear-gradient(135deg, #cce5ff 0%, #99ccff 100%);
    color: #004085;
    border: 1px solid #0066cc;
}

.upjau-order-card-status.packaging {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    color: #01579b;
    border: 1px solid #0277bd;
}

.upjau-order-card-status.shipped {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    color: #283593;
    border: 1px solid #3949ab;
}

.upjau-order-card-status.completed {
    background: linear-gradient(135deg, #d4edda 0%, #a8d5a8 100%);
    color: #155724;
    border: 1px solid #16892f;
}

.upjau-order-card-status.cancelled,
.upjau-order-card-status.refunded,
.upjau-order-card-status.failed {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 1px solid #dc3545;
}

/* Order Input Form */
.upjau-order-input-container h3 {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 10px 0;
    color: #1a1a1a;
}

.upjau-order-input-description {
    color: #666;
    margin-bottom: 25px;
    line-height: 1.6;
}

.upjau-order-input-form {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.upjau-order-id-input {
    flex: 1;
    padding: 12px 16px;
    border: 2px solid #16892f;
    border-radius: 4px;
    font-size: 16px;
    transition: all 0.3s;
}

.upjau-order-id-input:focus {
    outline: none;
    border-color: #f9d923;
    box-shadow: 0 0 0 3px rgba(249, 217, 35, 0.2);
}

/* Placeholder styling - grayed out */
.upjau-order-id-input::placeholder {
    color: #999;
    opacity: 1;
}

.upjau-order-id-input::-webkit-input-placeholder {
    color: #999;
    opacity: 1;
}

.upjau-order-id-input::-moz-placeholder {
    color: #999;
    opacity: 1;
}

.upjau-order-id-input:-ms-input-placeholder {
    color: #999;
    opacity: 1;
}

/* Buttons */
.upjau-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 4px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-block;
    text-align: center;
}

.upjau-btn-primary {
    background: linear-gradient(135deg, #16892f 0%, #1ea740 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(22, 137, 47, 0.3);
}

.upjau-btn-primary:hover {
    background: linear-gradient(135deg, #125e22 0%, #16892f 100%);
    box-shadow: 0 4px 12px rgba(22, 137, 47, 0.4);
    transform: translateY(-2px);
}

.upjau-btn-back {
    background: transparent;
    border: none;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    padding: 8px 12px;
    margin-bottom: 10px;
    display: inline-block;
    transition: all 0.3s;
    border-radius: 4px;
}

.upjau-btn-back:hover {
    color: #16892f;
    background: rgba(22, 137, 47, 0.1);
}

/* ============================================
   TWO-COLUMN LAYOUT
   ============================================ */

.upjau-tracking-two-column {
    display: flex;
    gap: 20px;
    align-items: flex-start;
    position: relative;
}

/* Wrapper for sticky sidebar (added by JavaScript) */
.upjau-sidebar-wrapper {
    width: 380px;
    flex-shrink: 0;
    position: relative;
}

/* Left Sidebar - Shipments List */
.upjau-tracking-sidebar {
    width: 380px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 40px);
    overflow: hidden;
    transition: none;
}

.upjau-sidebar-header {
    padding: 20px;
    border-bottom: 1px solid #eee;
    flex-shrink: 0;
}

.upjau-sidebar-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #1a1a1a;
}

.upjau-shipments-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

/* Shipment Card in Sidebar */
.upjau-shipment-card {
    background: linear-gradient(90deg, #ffffff 0%, #f8f8f8 100%);
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.upjau-shipment-card:hover {
    border-color: #16892f;
    background: linear-gradient(90deg, #f0f8f2 0%, #e8f5e9 100%);
    transform: translateX(4px);
}

.upjau-shipment-card.active {
    border-color: #16892f;
    background: linear-gradient(90deg, #f0f8f2 0%, #e8f5e9 100%);
    box-shadow: 0 4px 12px rgba(22, 137, 47, 0.2);
}

.upjau-shipment-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.upjau-shipment-number {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

.upjau-shipment-status-badge {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    text-transform: capitalize;
}

.upjau-shipment-status-badge.created,
.upjau-shipment-status-badge.pending {
    background: linear-gradient(135deg, #fff8e1 0%, #ffecb3 100%);
    color: #f57f17;
    border: 1px solid #ffb300;
    font-weight: 600;
}

.upjau-shipment-status-badge.packaging,
.upjau-shipment-status-badge.pickup_scheduled,
.upjau-shipment-status-badge.picked_up {
    background: linear-gradient(135deg, #e1f5fe 0%, #b3e5fc 100%);
    color: #01579b;
    border: 1px solid #0277bd;
    font-weight: 600;
}

.upjau-shipment-status-badge.in_transit {
    background: linear-gradient(135deg, #e8eaf6 0%, #c5cae9 100%);
    color: #283593;
    border: 1px solid #3949ab;
    font-weight: 600;
}

.upjau-shipment-status-badge.out_for_delivery {
    background: linear-gradient(135deg, #fff9c4 0%, #ffee58 100%);
    color: #f57f17;
    border: 1px solid #fbc02d;
    font-weight: 600;
}

.upjau-shipment-status-badge.delivered {
    background: linear-gradient(135deg, #c8e6c9 0%, #81c784 100%);
    color: #1b5e20;
    border: 1px solid #388e3c;
    font-weight: 600;
}

.upjau-shipment-status-badge.failed,
.upjau-shipment-status-badge.rto,
.upjau-shipment-status-badge.rto_in_transit,
.upjau-shipment-status-badge.rto_delivered,
.upjau-shipment-status-badge.cancelled,
.upjau-shipment-status-badge.lost,
.upjau-shipment-status-badge.damaged {
    background: linear-gradient(135deg, #ffcdd2 0%, #ef9a9a 100%);
    color: #b71c1c;
    border: 1px solid #c62828;
    font-weight: 600;
}

.upjau-shipment-meta {
    font-size: 13px;
    color: #666;
    line-height: 1.6;
}

.upjau-shipment-meta-row {
    margin-bottom: 4px;
}

.upjau-shipment-meta strong {
    color: #1a1a1a;
}

/* Right Main Panel - Tracking Details */
.upjau-tracking-main {
    flex: 1;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
    position: relative;
}

.upjau-tracking-details-content {
    padding: 30px;
    /* Ensure content starts from top when switching shipments */
    scroll-margin-top: 0;
}

/* Placeholder State */
.upjau-tracking-placeholder {
    text-align: center;
    padding: 80px 40px;
    color: #999;
}

.upjau-placeholder-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.upjau-tracking-placeholder h3 {
    font-size: 20px;
    font-weight: 600;
    color: #666;
    margin: 0 0 10px 0;
}

.upjau-tracking-placeholder p {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* Order Status Header */
.upjau-order-status-header {
    border-bottom: 2px solid #eee;
    padding-bottom: 20px;
    margin-bottom: 30px;
}

.upjau-order-status-header h3 {
    font-size: 24px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 15px 0;
}

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

.upjau-order-info-item {
    font-size: 14px;
}

.upjau-order-info-label {
    color: #666;
    margin-bottom: 4px;
}

.upjau-order-info-value {
    font-size: 16px;
    font-weight: 600;
    color: #1a1a1a;
}

/* ============================================
   TRACKING PROGRESS SLIDER
   ============================================ */

.upjau-tracking-progress {
    margin: 40px 0;
}

.upjau-progress-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin-bottom: 30px;
}

.upjau-progress-stages {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 0 20px;
    margin-bottom: 50px;
}

/* Progress Line */
.upjau-progress-line {
    position: absolute;
    top: 25px;
    left: 20px;
    right: 20px;
    height: 3px;
    background: #e0e0e0;
    z-index: 0;
}

.upjau-progress-line-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: #16892f;
    transition: width 0.5s ease;
}

/* Progress Stage */
.upjau-progress-stage {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    text-align: center;
}

.upjau-stage-icon-wrapper {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: #fff;
    border: 3px solid #e0e0e0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    transition: all 0.3s;
    position: relative;
}

.upjau-progress-stage.completed .upjau-stage-icon-wrapper {
    background: #16892f;
    border-color: #16892f;
}

.upjau-progress-stage.active .upjau-stage-icon-wrapper {
    background: linear-gradient(135deg, #fff9c4 0%, #f9d923 100%);
    border-color: #f9d923;
    border-width: 4px;
    box-shadow: 0 0 0 6px rgba(249, 217, 35, 0.2), 0 4px 12px rgba(249, 217, 35, 0.3);
    animation: pulse-yellow 2s ease-in-out infinite;
}

@keyframes pulse-yellow {

    0%,
    100% {
        box-shadow: 0 0 0 6px rgba(249, 217, 35, 0.2), 0 4px 12px rgba(249, 217, 35, 0.3);
    }

    50% {
        box-shadow: 0 0 0 10px rgba(249, 217, 35, 0.1), 0 4px 16px rgba(249, 217, 35, 0.4);
    }
}

.upjau-stage-icon {
    font-size: 24px;
    line-height: 1;
}

.upjau-progress-stage.completed .upjau-stage-icon {
    filter: brightness(0) invert(1);
}

.upjau-progress-stage.active .upjau-stage-icon {
    filter: none;
}

.upjau-stage-label {
    font-size: 13px;
    color: #999;
    font-weight: 500;
    max-width: 100px;
    line-height: 1.3;
}

.upjau-progress-stage.completed .upjau-stage-label,
.upjau-progress-stage.active .upjau-stage-label {
    color: #1a1a1a;
    font-weight: 600;
}

.upjau-stage-date {
    font-size: 11px;
    color: #999;
    margin-top: 4px;
}

.upjau-progress-stage.completed .upjau-stage-date,
.upjau-progress-stage.active .upjau-stage-date {
    color: #666;
}

/* ============================================
   ORDER TIMELINE SECTION
   ============================================ */

.upjau-order-timeline-section {
    margin-top: 40px;
    margin-bottom: 50px;
}

.upjau-order-timeline {
    margin-top: 20px;
}

/* Order Progress Stages - High specificity for order details */
.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stages {
    position: relative !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
    padding: 0 20px !important;
    margin-bottom: 40px !important;
}

/* Order Progress Line */
.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-line {
    position: absolute !important;
    top: 25px !important;
    left: 20px !important;
    right: 20px !important;
    height: 3px !important;
    background: #e0e0e0 !important;
    z-index: 0 !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-line-fill {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    height: 100% !important;
    background: #16892f !important;
    transition: width 0.5s ease !important;
}

/* Order Progress Stage */
.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage {
    position: relative !important;
    z-index: 1 !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    flex: 1 !important;
    text-align: center !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-stage-icon-wrapper {
    width: 50px !important;
    height: 50px !important;
    border-radius: 50% !important;
    background: #fff !important;
    border: 3px solid #e0e0e0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    margin-bottom: 12px !important;
    transition: all 0.3s !important;
    position: relative !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage.completed .upjau-order-stage-icon-wrapper {
    background: #16892f !important;
    border-color: #16892f !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage.active .upjau-order-stage-icon-wrapper {
    background: linear-gradient(135deg, #fff9c4 0%, #f9d923 100%) !important;
    border-color: #f9d923 !important;
    border-width: 4px !important;
    box-shadow: 0 0 0 6px rgba(249, 217, 35, 0.2), 0 4px 12px rgba(249, 217, 35, 0.3) !important;
    animation: pulse-yellow 2s ease-in-out infinite !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-stage-icon {
    font-size: 24px !important;
    line-height: 1 !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage.completed .upjau-order-stage-icon {
    filter: brightness(0) invert(1) !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage.active .upjau-order-stage-icon {
    filter: none !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-stage-label {
    font-size: 13px !important;
    color: #999 !important;
    font-weight: 500 !important;
    max-width: 100px !important;
    line-height: 1.3 !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage.completed .upjau-order-stage-label,
.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage.active .upjau-order-stage-label {
    color: #1a1a1a !important;
    font-weight: 600 !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-stage-date {
    font-size: 11px !important;
    color: #999 !important;
    margin-top: 4px !important;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage.completed .upjau-order-stage-date,
.upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage.active .upjau-order-stage-date {
    color: #666 !important;
}

/* Order Status Card (for cancelled/refunded/failed) */
.upjau-order-status-card {
    background: linear-gradient(135deg, #fff 0%, #f8f8f8 100%);
    border: 3px solid;
    border-radius: 12px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.upjau-order-status-icon {
    font-size: 48px;
    margin-bottom: 15px;
    line-height: 1;
}

.upjau-order-status-text {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #1a1a1a;
}

.upjau-order-status-message {
    font-size: 16px;
    color: #666;
    margin-bottom: 10px;
}

.upjau-order-status-date {
    font-size: 14px;
    color: #999;
}

/* Order Current Status Card */
.upjau-order-current-status-card {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 3px solid #16892f;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 4px 12px rgba(22, 137, 47, 0.15);
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-current-status-card {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%) !important;
    border: 3px solid #16892f !important;
    border-radius: 12px !important;
    padding: 24px !important;
    box-shadow: 0 4px 12px rgba(22, 137, 47, 0.15) !important;
}

.upjau-order-current-status-card h4 {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-current-status-card h4 {
    font-size: 14px !important;
    color: #666 !important;
    margin: 0 0 8px 0 !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    font-weight: 600 !important;
}

.upjau-order-current-status-text {
    font-size: 24px;
    font-weight: 700;
    color: #16892f;
    margin: 0 0 8px 0;
    text-shadow: 0 1px 2px rgba(22, 137, 47, 0.1);
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-current-status-text {
    font-size: 24px !important;
    font-weight: 700 !important;
    color: #16892f !important;
    margin: 0 0 8px 0 !important;
    text-shadow: 0 1px 2px rgba(22, 137, 47, 0.1) !important;
}

.upjau-order-current-status-message {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

.upjau-tracking-container .upjau-order-details-content .upjau-order-current-status-message {
    font-size: 14px !important;
    color: #555 !important;
    margin: 0 !important;
    line-height: 1.5 !important;
}

/* ============================================
   SHIPMENT DETAILS SECTION
   ============================================ */

.upjau-shipment-details-section {
    margin-top: 40px;
}

.upjau-section-title {
    font-size: 18px;
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 20px 0;
    padding-bottom: 10px;
    border-bottom: 2px solid #eee;
}

/* Ensure section title styles in order details */
.upjau-tracking-container .upjau-order-details-content .upjau-section-title {
    font-size: 18px !important;
    font-weight: 600 !important;
    color: #1a1a1a !important;
    margin: 0 0 20px 0 !important;
    padding-bottom: 10px !important;
    border-bottom: 2px solid #eee !important;
}

/* Products in Detail View */
.upjau-products-grid {
    display: grid;
    gap: 15px;
}

.upjau-product-card {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.upjau-product-image {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
    background: #e0e0e0;
    flex-shrink: 0;
}

.upjau-product-info {
    flex: 1;
}

.upjau-product-name {
    font-weight: 600;
    color: #1a1a1a;
    margin: 0 0 4px 0;
    font-size: 15px;
}

.upjau-product-sku {
    font-size: 12px;
    color: #999;
    margin: 0;
}

.upjau-product-quantity {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

/* ============================================
   TIMELINE EVENTS
   ============================================ */

.upjau-timeline-section {
    margin-top: 50px;
}

.upjau-timeline-events {
    position: relative;
    padding-left: 40px;
}

.upjau-timeline-events::before {
    content: '';
    position: absolute;
    left: 12px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e0e0e0;
}

.upjau-timeline-event {
    position: relative;
    margin-bottom: 30px;
    padding-bottom: 20px;
}

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

.upjau-timeline-event::before {
    content: '';
    position: absolute;
    left: -34px;
    top: 4px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: #16892f;
    border: 3px solid #fff;
    box-shadow: 0 0 0 2px #16892f;
}

.upjau-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 6px;
}

.upjau-event-status {
    font-weight: 600;
    color: #1a1a1a;
    font-size: 15px;
}

.upjau-event-time {
    font-size: 12px;
    color: #999;
    white-space: nowrap;
}

.upjau-event-message {
    color: #666;
    font-size: 14px;
    line-height: 1.5;
    margin-bottom: 4px;
}

.upjau-event-location {
    font-size: 13px;
    color: #999;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Current Status Highlight */
.upjau-current-status-card {
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
    border: 3px solid #16892f;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 40px;
    box-shadow: 0 4px 12px rgba(22, 137, 47, 0.15);
    position: relative;
    overflow: hidden;
}

.upjau-current-status-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(249, 217, 35, 0.1) 0%, transparent 70%);
    pointer-events: none;
}

.upjau-current-status-card h4 {
    font-size: 14px;
    color: #666;
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.upjau-current-status-text {
    font-size: 24px;
    font-weight: 700;
    color: #16892f;
    margin: 0 0 8px 0;
    text-shadow: 0 1px 2px rgba(22, 137, 47, 0.1);
}

.upjau-current-status-message {
    font-size: 14px;
    color: #555;
    margin: 0;
    line-height: 1.5;
}

/* Estimated tracking notice */
.upjau-estimated-notice {
    background: linear-gradient(135deg, #fff9c4 0%, #ffecb3 100%);
    border: 2px solid #f9d923;
    border-radius: 8px;
    padding: 12px 16px;
    margin-top: 12px;
    font-size: 13px;
    color: #f57f17;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.upjau-estimated-notice::before {
    content: 'ℹ️';
    font-size: 16px;
}

/* Courier Info */
.upjau-courier-info {
    display: flex;
    gap: 20px;
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border-radius: 6px;
}

.upjau-courier-info-item {
    flex: 1;
}

.upjau-courier-info-label {
    font-size: 12px;
    color: #666;
    margin-bottom: 4px;
}

.upjau-courier-info-value {
    font-size: 15px;
    font-weight: 600;
    color: #1a1a1a;
}

/* Loading State */
.upjau-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.upjau-loading::after {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #16892f;
    border-radius: 50%;
    border-top-color: transparent;
    animation: upjau-spin 0.8s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

@keyframes upjau-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Error Messages */
.upjau-error-message {
    background-color: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 15px;
}

.upjau-success-message {
    background-color: #efe;
    border: 1px solid #cfc;
    color: #3c3;
    padding: 12px 16px;
    border-radius: 4px;
    margin-top: 15px;
}

/* Empty State */
.upjau-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: #999;
}

.upjau-empty-state-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.upjau-empty-state-message {
    font-size: 16px;
}

/* Scrollbar Styling */
.upjau-shipments-list::-webkit-scrollbar {
    width: 8px;
}

.upjau-shipments-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.upjau-shipments-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 10px;
}

.upjau-shipments-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .upjau-tracking-sidebar {
        width: 320px;
    }

    .upjau-order-card {
        padding: 16px;
    }

    .upjau-order-card-info h4 {
        font-size: 16px;
    }

    .upjau-order-card-meta {
        gap: 10px;
        font-size: 13px;
    }

    .upjau-progress-stages {
        padding: 0 15px;
        gap: 5px;
    }

    .upjau-progress-line {
        left: 15px;
        right: 15px;
        top: 23px;
    }

    .upjau-stage-icon-wrapper {
        width: 46px;
        height: 46px;
    }

    .upjau-stage-icon {
        font-size: 20px;
    }

    .upjau-stage-label {
        font-size: 12px;
        max-width: 85px;
        line-height: 1.3;
        word-break: break-word;
    }
}

@media (max-width: 768px) {
    .upjau-tracking-container {
        padding: 15px;
    }

    .upjau-tracking-header h2 {
        font-size: 24px;
    }

    .upjau-tracking-view {
        padding: 20px;
    }

    .upjau-order-input-form {
        flex-direction: column;
    }

    .upjau-order-card {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 15px;
    }

    .upjau-order-card-meta {
        flex-direction: column;
        gap: 8px;
        width: 100%;
    }

    .upjau-order-card-meta-item {
        width: 100%;
        justify-content: flex-start;
    }

    .upjau-order-card-status {
        align-self: flex-start;
    }

    /* Stack two columns vertically on mobile */
    .upjau-tracking-two-column {
        flex-direction: column;
    }

    .upjau-sidebar-wrapper {
        width: 100% !important;
        position: static !important;
    }

    .upjau-tracking-sidebar {
        width: 100%;
        height: auto;
        max-height: 60vh;
        min-height: 300px;
        margin-bottom: 20px;
        position: static !important;
        top: auto !important;
        left: auto !important;
        z-index: 1 !important;
    }

    .upjau-tracking-main {
        width: 100%;
    }

    .upjau-tracking-details-content {
        padding: 20px;
    }

    /* Simplify progress stages for mobile */
    .upjau-tracking-progress {
        margin: 30px 0;
    }

    .upjau-progress-stages {
        padding: 0 10px;
        gap: 8px;
    }

    .upjau-progress-line {
        left: 10px;
        right: 10px;
        top: 22px;
    }

    .upjau-stage-icon-wrapper {
        width: 44px;
        height: 44px;
    }

    .upjau-stage-icon {
        font-size: 20px;
    }

    .upjau-stage-label {
        font-size: 11px;
        max-width: 70px;
        line-height: 1.2;
        word-break: break-word;
    }

    .upjau-stage-date {
        display: none;
    }

    .upjau-order-info-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .upjau-courier-info {
        flex-direction: column;
        gap: 12px;
    }

    /* Order timeline responsive */
    .upjau-order-progress-stages {
        padding: 0 15px;
        gap: 5px;
    }

    .upjau-order-progress-line {
        left: 15px;
        right: 15px;
        top: 23px;
    }

    .upjau-order-stage-icon-wrapper {
        width: 46px;
        height: 46px;
    }

    .upjau-order-stage-icon {
        font-size: 20px;
    }

    .upjau-order-stage-label {
        font-size: 12px;
        max-width: 85px;
        line-height: 1.3;
        word-break: break-word;
    }

    .upjau-order-status-card {
        padding: 20px;
    }

    .upjau-order-status-icon {
        font-size: 36px;
    }

    .upjau-order-status-text {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .upjau-tracking-header h2 {
        font-size: 20px;
    }

    .upjau-tracking-sidebar {
        max-height: 50vh;
        min-height: 250px;
    }

    .upjau-shipment-card {
        padding: 12px;
    }

    .upjau-shipment-number {
        font-size: 14px;
    }

    .upjau-shipment-meta {
        font-size: 12px;
    }

    /* Vertical timeline layout on very small screens */
    .upjau-progress-stages {
        flex-direction: column;
        align-items: flex-start;
        padding: 0 20px 0 0;
        gap: 0;
        margin-bottom: 30px;
        position: relative;
    }

    /* Vertical connecting line */
    .upjau-progress-line {
        display: block;
        position: absolute;
        left: 25px;
        top: 50px;
        bottom: 50px;
        width: 3px;
        height: auto;
        background: #e0e0e0;
        z-index: 0;
    }

    .upjau-progress-line-fill {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 0;
        background: #16892f;
        transition: height 0.5s ease;
    }

    .upjau-progress-stage {
        position: relative;
        flex-direction: row;
        align-items: flex-start;
        justify-content: flex-start;
        text-align: left;
        padding: 0 0 25px 0;
        width: 100%;
        z-index: 1;
    }

    .upjau-progress-stage:last-child {
        padding-bottom: 0;
    }

    .upjau-stage-icon-wrapper {
        width: 50px;
        height: 50px;
        margin-bottom: 0;
        margin-right: 20px;
        flex-shrink: 0;
        background: #fff;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    }

    .upjau-stage-icon {
        font-size: 22px;
    }

    .upjau-stage-label {
        font-size: 15px;
        max-width: none;
        line-height: 1.5;
        flex: 1;
        padding-top: 10px;
        font-weight: 500;
    }

    /* Active and completed states for vertical timeline */
    .upjau-progress-stage.completed .upjau-stage-label,
    .upjau-progress-stage.active .upjau-stage-label {
        font-weight: 600;
    }

    .upjau-product-card {
        flex-direction: column;
        text-align: center;
    }

    .upjau-product-image {
        width: 80px;
        height: 80px;
    }

    .upjau-timeline-events {
        padding-left: 30px;
    }

    .upjau-timeline-event::before {
        left: -26px;
        width: 12px;
        height: 12px;
    }

    /* Order timeline vertical layout on very small screens */
    .upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stages {
        flex-direction: column !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        padding: 0 20px 0 0 !important;
        gap: 0 !important;
        margin-bottom: 30px !important;
        position: relative !important;
    }

    .upjau-tracking-container .upjau-order-details-content .upjau-order-progress-line {
        display: block !important;
        position: absolute !important;
        left: 25px !important;
        top: 50px !important;
        bottom: 50px !important;
        right: auto !important;
        width: 3px !important;
        height: auto !important;
        background: #e0e0e0 !important;
        z-index: 0 !important;
    }

    .upjau-tracking-container .upjau-order-details-content .upjau-order-progress-line-fill {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        height: 0 !important;
        background: #16892f !important;
        transition: height 0.5s ease !important;
    }

    .upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage {
        position: relative !important;
        flex-direction: row !important;
        align-items: flex-start !important;
        justify-content: flex-start !important;
        text-align: left !important;
        padding: 0 0 25px 0 !important;
        width: 100% !important;
        flex: none !important;
        z-index: 1 !important;
    }

    .upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage:last-child {
        padding-bottom: 0 !important;
    }

    .upjau-tracking-container .upjau-order-details-content .upjau-order-stage-icon-wrapper {
        width: 50px !important;
        height: 50px !important;
        margin-bottom: 0 !important;
        margin-right: 20px !important;
        flex-shrink: 0 !important;
        background: #fff !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
    }

    .upjau-tracking-container .upjau-order-details-content .upjau-order-stage-icon {
        font-size: 22px !important;
    }

    .upjau-tracking-container .upjau-order-details-content .upjau-order-stage-label {
        font-size: 15px !important;
        max-width: none !important;
        line-height: 1.5 !important;
        flex: 1 !important;
        padding-top: 10px !important;
        font-weight: 500 !important;
    }

    .upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage.completed .upjau-order-stage-label,
    .upjau-tracking-container .upjau-order-details-content .upjau-order-progress-stage.active .upjau-order-stage-label {
        font-weight: 600 !important;
    }

    .upjau-order-status-card {
        padding: 20px;
    }

    .upjau-order-status-icon {
        font-size: 36px;
    }

    .upjau-order-status-text {
        font-size: 18px;
    }
}

/* Utility Classes */
.upjau-hidden {
    display: none !important;
}

.upjau-text-center {
    text-align: center;
}

.upjau-mt-20 {
    margin-top: 20px;
}

.upjau-mb-20 {
    margin-bottom: 20px;
}