/* Order Tracking Styles */
.order-tracking-container {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.tracking-form-wrapper {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    padding: 40px;
    margin-bottom: 30px;
}

.tracking-form-wrapper h2 {
    margin: 0 0 10px 0;
    font-size: 28px;
    color: #333;
    font-weight: 600;
}

.form-description {
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

.tracking-form .form-group {
    margin-bottom: 25px;
}

.tracking-form label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
    font-size: 15px;
}

.tracking-form input[type="tel"] {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.tracking-form input[type="tel"]:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.tracking-form small {
    display: block;
    margin-top: 6px;
    color: #999;
    font-size: 13px;
}

.btn-track {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #006FBA 0%, #0062AA 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.btn-track:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(76, 175, 80, 0.3);
}

.btn-track:active {
    transform: translateY(0);
}

.btn-track:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Orders List */
.orders-list {
    margin-top: 30px;
}

.orders-list h3 {
    font-size: 22px;
    color: #333;
    margin-bottom: 8px;
    padding-bottom: 12px;
    border-bottom: 2px solid #f0f0f0;
}

.orders-note {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
    font-style: italic;
}

/* Order Card */
.order-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.12);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: #f8f9fa;
    border-bottom: 1px solid #e9ecef;
}

.order-number strong {
    font-size: 18px;
    color: #333;
    display: block;
    margin-bottom: 4px;
}

.order-date {
    font-size: 14px;
    color: #666;
}

.order-status {
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-processing,
.status-processing-step-1 {
    background: #cce5ff;
    color: #004085;
}

.status-processing-step-2 {
    background: #ffe0b2;
    color: #e65100;
}

.status-processing-step-3 {
    background: #c8e6c9;
    color: #2e7d32;
}

.status-on-hold {
    background: #f8d7da;
    color: #721c24;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-refunded {
    background: #e2e3e5;
    color: #383d41;
}

.status-failed {
    background: #f8d7da;
    color: #721c24;
}

/* Order Info */
.order-info {
    padding: 20px 25px;
    background: #fff;
    border-bottom: 1px solid #f0f0f0;
}

/* Order Timeline - NEW */
.order-timeline {
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e0e0e0;
}

.timeline-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.timeline-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    transform: translateX(2px);
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.timeline-icon {
    font-size: 24px;
    line-height: 1;
    flex-shrink: 0;
    min-width: 32px;
    text-align: center;
}

.timeline-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timeline-content strong {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.timeline-content > span {
    font-size: 15px;
    color: #555;
}

.timeline-content small {
    font-size: 12px;
    color: #999;
    margin-top: 2px;
}

.text-muted {
    color: #6c757d;
}

/* Timeline Status Styling */
.timeline-status {
    border-left: 3px solid #006FBA;
    background: #f0f9f1;
}

.timeline-status .status-text {
    font-weight: 600;
    font-size: 16px;
}

.status-description {
    color: #666 !important;
    font-style: italic;
}

/* Status Icons with Colors */
.status-icon-processing-step-1 {
    color: #2196F3;
}

.status-icon-processing-step-2 {
    color: #FF9800;
}

.status-icon-processing-step-3 {
    color: #4CAF50;
}

.status-icon-completed {
    color: #4CAF50;
}

.status-icon-pending {
    color: #FFC107;
}

.status-icon-cancelled,
.status-icon-failed {
    color: #F44336;
}

.status-icon-on-hold {
    color: #9E9E9E;
}

.status-icon-refunded {
    color: #607D8B;
}

.info-row {
    display: flex;
    padding: 10px 0;
    border-bottom: 1px solid #f8f9fa;
}

.info-row:last-child {
    border-bottom: none;
}

.info-label {
    min-width: 140px;
    font-weight: 500;
    color: #666;
    font-size: 14px;
}

.info-value {
    color: #333;
    font-size: 14px;
    flex: 1;
}

/* Order Items */
.order-items {
    padding: 20px 25px;
    background: #fafafa;
}

.order-items h4 {
    margin: 0 0 15px 0;
    font-size: 16px;
    color: #333;
    font-weight: 600;
}

.order-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.2s ease;
}

.order-item:hover {
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.order-item:last-child {
    margin-bottom: 0;
}

.order-item img {
    width: 60px;
    height: 60px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.item-details {
    flex: 1;
}

.item-name {
    font-weight: 500;
    color: #333;
    margin-bottom: 5px;
    font-size: 15px;
}

.item-meta {
    color: #666;
    font-size: 13px;
}

.item-total {
    font-weight: 600;
    color: #4CAF50;
    font-size: 16px;
    white-space: nowrap;
}

/* Order Total */
.order-total {
    padding: 20px 25px;
    background: #fff;
}

.total-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 8px;
    font-size: 15px;
}

.total-row.subtotal {
    background: #f8f9fa;
}

.total-row.shipping {
    background: #fff3cd;
    color: #856404;
}

.total-row.shipping.free {
    background: #d4edda;
    color: #155724;
}

.free-shipping {
    font-weight: 600;
    color: #28a745;
}

.total-row.grand-total {
    background: #f8f9fa;
    border: 2px solid #006FBA;
    margin-top: 4px;
    margin-bottom: 0;
}

.total-row span {
    font-size: 15px;
    color: #666;
}

.total-row.grand-total span {
    font-size: 16px;
    font-weight: 600;
    color: #333;
}

.total-row strong {
    font-size: 22px;
    color: #4CAF50;
}

.required {
    color: #dc3545;
    font-weight: bold;
}

/* Alert Messages */
.tracking-alert {
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 15px;
}

.tracking-alert-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.tracking-alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tracking-form-wrapper {
        padding: 25px 20px;
    }
    
    .tracking-form-wrapper h2 {
        font-size: 24px;
    }
    
    .order-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .order-status {
        align-self: flex-start;
    }
    
    .order-timeline {
        padding: 20px 15px;
    }
    
    .timeline-item {
        padding: 12px;
    }
    
    .timeline-icon {
        font-size: 20px;
        min-width: 28px;
    }
    
    .timeline-content strong {
        font-size: 13px;
    }
    
    .timeline-content > span {
        font-size: 14px;
    }
    
    .info-row {
        flex-direction: column;
        gap: 5px;
    }
    
    .info-label {
        min-width: auto;
        font-weight: 600;
    }
    
    .order-item {
        flex-wrap: wrap;
    }
    
    .order-item img {
        width: 50px;
        height: 50px;
    }
    
    .item-name {
        font-size: 14px;
    }
    
    .item-total {
        width: 100%;
        text-align: right;
        margin-top: 8px;
    }
    
    .total-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .total-row strong {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .order-tracking-container {
        padding: 0 15px;
        margin: 20px auto;
    }
    
    .tracking-form-wrapper {
        padding: 20px 15px;
    }
    
    .order-card {
        border-radius: 8px;
    }
    
    .order-header,
    .order-info,
    .order-items,
    .order-total {
        padding: 15px;
    }
}