/* Delivery Tracking Modal Styles */
#deliveryModal .modal-dialog {
    max-width: 600px;
    width: 100%;
    margin: 1.75rem auto;
}

#deliveryModal .modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 8px 32px rgba(39, 91, 102, 0.2);
}

#deliveryModal .modal-header {
    background: linear-gradient(135deg, #275b66, #1f4a53);
    color: white;
    border-bottom: none;
    border-radius: 12px 12px 0 0;
}

#deliveryModal .modal-title {
    color: white !important;
}

#deliveryModal .modal-header .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
}

#deliveryModal .current-status {
    text-align: center;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 20px;
}

#deliveryModal .status-badge .badge {
    font-size: 0.9em;
    margin: 0 5px;
    padding: 8px 12px;
    border-radius: 6px;
}

/* Timeline Styles */
.timeline-container {
    position: relative;
    padding: 20px 0;
}

.timeline-step {
    position: relative;
    padding: 15px 0;
    margin-left: 40px;
    border-left: 3px solid #e9ecef;
}

.timeline-step:not(:last-child)::after {
    content: '';
    position: absolute;
    left: -3px;
    bottom: 0;
    width: 3px;
    height: 15px;
    background-color: #e9ecef;
}

.timeline-step.completed {
    border-left-color: #275b66;
}

.timeline-step.completed::after {
    background-color: #275b66;
}

.timeline-step.active {
    border-left-color: #275b66;
    animation: pulse-border 2s infinite;
}

.timeline-step.active::after {
    background-color: #275b66;
}

@keyframes pulse-border {
    0%, 100% {
        border-left-color: #275b66;
    }
    50% {
        border-left-color: #1f4a53;
    }
}

.step-content {
    position: relative;
    background: white;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-left: -20px;
}

.timeline-step.active .step-content {
    box-shadow: 0 4px 12px rgba(39, 91, 102, 0.3);
    border-left: 3px solid #275b66;
}

.timeline-step.completed .step-content {
    border-left: 3px solid #275b66;
}

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

.step-title {
    display: flex;
    align-items: center;
}

.step-icon {
    font-size: 1.5em;
    margin-right: 12px;
    width: 30px;
    text-align: center;
}

.step-name {
    margin: 0;
    font-size: 1.1em;
    font-weight: 600;
    color: #343a40;
}

.timeline-step.active .step-name {
    color: #275b66;
}

.timeline-step.completed .step-name {
    color: #275b66;
}

.step-time {
    font-size: 0.9em;
    color: #6c757d;
    font-weight: 500;
}

.timeline-step.active .step-time {
    color: #275b66;
    font-weight: 600;
}

.step-description {
    margin: 0;
    color: #6c757d;
    font-size: 0.9em;
    line-height: 1.4;
}

.timeline-step.active .step-description {
    color: #495057;
}

/* Modal Footer */
#deliveryModal .modal-footer {
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    border-radius: 0 0 12px 12px;
}

#deliveryModal .modal-footer .btn {
    min-width: 120px;
    border-radius: 6px;
}

#deliveryModal .modal-footer .btn-primary {
    background-color: #275b66;
    border-color: #275b66;
}

#deliveryModal .modal-footer .btn-primary:hover {
    background-color: #1f4a53;
    border-color: #1f4a53;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #deliveryModal .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    #deliveryModal .modal-header {
        padding: 15px;
    }
    
    #deliveryModal .modal-title {
        font-size: 1.1rem;
    }
    
    .timeline-step {
        margin-left: 25px;
    }
    
    .step-content {
        margin-left: -15px;
        padding: 12px;
    }
    
    .step-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .step-icon {
        font-size: 1.2em;
        margin-right: 8px;
    }
    
    .step-name {
        font-size: 0.95rem;
    }
    
    .step-time {
        font-size: 0.8rem;
    }
    
    .step-description {
        font-size: 0.85rem;
    }
    
    .current-status {
        padding: 12px;
    }
    
    .status-badge .badge {
        font-size: 0.8rem;
        padding: 6px 10px;
        margin: 2px;
    }
    
    #deliveryModal .modal-footer {
        padding: 12px 15px;
        flex-direction: column;
        gap: 10px;
    }
    
    #deliveryModal .modal-footer .btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 480px) {
    #deliveryModal .modal-dialog {
        margin: 5px;
        max-width: calc(100% - 10px);
    }
    
    #deliveryModal .modal-header {
        padding: 12px;
    }
    
    #deliveryModal .modal-title {
        font-size: 1rem;
        line-height: 1.3;
    }
    
    .timeline-step {
        margin-left: 20px;
    }
    
    .step-content {
        margin-left: -10px;
        padding: 10px;
    }
    
    .step-icon {
        font-size: 1.1em;
        margin-right: 6px;
        width: 25px;
    }
    
    .step-name {
        font-size: 0.9rem;
    }
    
    .step-time {
        font-size: 0.75rem;
    }
    
    .step-description {
        font-size: 0.8rem;
        line-height: 1.3;
    }
    
    .current-status {
        padding: 10px;
        margin-bottom: 15px;
    }
    
    .status-badge .badge {
        font-size: 0.75rem;
        padding: 5px 8px;
        display: block;
        margin: 3px 0;
        text-align: center;
    }
}

/* Loading states */
.track-order-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.modal-footer button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Status badges */
.badge.bg-primary {
    background-color: #275b66 !important;
    border-radius: 6px;
}

.badge.bg-success {
    background-color: #275b66 !important;
    border-radius: 6px;
}

/* Text colors for source info */
.text-success {
    color: #275b66 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-info {
    color: #275b66 !important;
}

.text-muted {
    color: #6c757d !important;
}