/* Track Order Styles */

.tracking-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Input Section */
.tracking-input-section {
    margin-bottom: 2rem;
}

.tracking-input-card {
    background: #fff;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #e9ecef;
}

.input-header {
    text-align: center;
    margin-bottom: 2rem;
}

.input-header h3 {
    color: #333;
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 600;
}

.input-header h3 i {
    color: var(--accent-color, #007bff);
    margin-right: 0.5rem;
}

.input-header p {
    color: #6c757d;
    margin: 0;
    font-size: 1rem;
}

.input-form .form-group {
    margin-bottom: 1rem;
}

.input-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: #333;
}

.input-group {
    display: flex;
    gap: 0;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.input-group .form-control {
    flex: 1;
    border: 2px solid #e9ecef;
    border-right: none;
    border-radius: 8px 0 0 8px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.input-group .form-control:focus {
    outline: none;
    border-color: var(--accent-color, #007bff);
    box-shadow: none;
}

.input-group .btn {
    border-radius: 0 8px 8px 0;
    padding: 12px 24px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: 2px solid var(--accent-color, #007bff);
    background: var(--accent-color, #007bff);
    color: white;
}

.input-group .btn:hover {
    background: var(--accent-dark, #0056b3);
    border-color: var(--accent-dark, #0056b3);
}

.input-group .btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.input-help {
    margin-top: 0.75rem;
    text-align: center;
}

.input-help small {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    border-radius: 6px;
    padding: 8px 12px;
    margin-top: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Results Section */
.tracking-results-section {
    animation: slideIn 0.3s ease-out;
}

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

.tracking-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.tracking-header {
    background: linear-gradient(135deg, var(--accent-color, #007bff) 0%, var(--accent-dark, #0056b3) 100%);
    color: white;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.tracking-header h2 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: #fff;
}

.btn-close-tracking {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.btn-close-tracking:hover {
    background: rgba(255, 255, 255, 0.3);
}

.tracking-details {
    padding: 2rem;
}

/* Order Summary */
.order-summary {
    background: #f8f9fa;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #e9ecef;
}

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

.summary-row .label {
    font-weight: 500;
    color: #495057;
}

.summary-row .value {
    color: #333;
    font-weight: 500;
}

.pickup-code {
    background: var(--accent-color, #007bff);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* Status Styles */
.status {
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: capitalize;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-confirmed {
    background: #d1ecf1;
    color: #0c5460;
}

.status-processing {
    background: #d4edda;
    color: #155724;
}

.status-shipped {
    background: #cce5ff;
    color: #004085;
}

.status-delivered {
    background: #d4edda;
    color: #155724;
}

.status-cancelled {
    background: #f8d7da;
    color: #721c24;
}

.status-completed {
    background: #d4edda;
    color: #155724;
}

.status-default {
    background: #e9ecef;
    color: #495057;
}

/* Timeline Section */
.timeline-section {
    margin-top: 2rem;
}

.timeline-section h4 {
    margin-bottom: 1.5rem;
    color: #333;
    font-weight: 600;
    font-size: 1.25rem;
}

.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 2rem;
    padding-left: 3rem;
}

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

.timeline-icon {
    position: absolute;
    left: -2.5rem;
    top: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    border: 3px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: #6c757d;
    z-index: 1;
}

.timeline-item.completed .timeline-icon {
    background: var(--accent-color, #007bff);
    color: white;
}

.timeline-content h6 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
}

.timeline-content p {
    margin: 0 0 0.25rem 0;
    color: #6c757d;
    line-height: 1.5;
}

.timeline-content .date {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 500;
}

.timeline-item.completed .timeline-content h6 {
    color: var(--accent-color, #007bff);
}

/* No Timeline Message */
.no-timeline {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.no-timeline p {
    margin: 0;
    font-style: italic;
}

/* Loading Animation */
.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Button Loading States */
.btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .tracking-input-card {
        padding: 1.5rem;
    }
    
    .input-header h3 {
        font-size: 1.25rem;
    }
    
    .input-group {
        flex-direction: column;
        border-radius: 8px;
    }
    
    .input-group .form-control {
        border-radius: 8px;
        border-right: 2px solid #e9ecef;
        margin-bottom: 0.75rem;
        width: 100%;
    }
    
    .input-group .btn {
        border-radius: 8px;
        width: 100%;
    }
    
    .tracking-header {
        padding: 1rem 1.5rem;
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
    
    .tracking-header h2 {
        font-size: 1.25rem;
    }
    
    .tracking-details {
        padding: 1.5rem;
    }
    
    .order-summary {
        padding: 1rem;
    }
    
    .summary-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
        padding: 0.75rem 0;
    }
    
    .timeline {
        padding-left: 1.5rem;
    }
    
    .timeline-item {
        padding-left: 2.5rem;
    }
    
    .timeline-icon {
        left: -2rem;
        width: 28px;
        height: 28px;
        font-size: 12px;
    }
}

@media (max-width: 576px) {
    .tracking-container {
        margin: 0 1rem;
    }
    
    .tracking-input-card {
        padding: 1rem;
    }
    
    .input-header {
        margin-bottom: 1.5rem;
    }
    
    .tracking-details {
        padding: 1rem;
    }
    
    .order-summary {
        padding: 0.75rem;
    }
    
    .timeline-section h4 {
        font-size: 1.1rem;
    }
}

/* Print Styles */
@media print {
    .tracking-input-section,
    .btn-close-tracking {
        display: none;
    }
    
    .tracking-card {
        box-shadow: none;
        border: 1px solid #ccc;
    }
    
    .tracking-header {
        background: #f8f9fa !important;
        color: #333 !important;
    }
}

/* Popup container */
.transitions-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1050;
}

/* Popup content box */
.transitions-popup .popup-content {
    background: #fff;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
    overflow: hidden;
    animation: fadeInScale 0.3s ease;
}

/* Header */
.transitions-popup .popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: var(--main-color);
    color: #fff;
}

.transitions-popup .popup-header h5 {
    margin: 0;
    font-size: 1.1rem;
}

.transitions-popup .btn-close-popup {
    background: none;
    border: none;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
    color: #fff;
}

/* Body */
.transitions-popup .popup-body {
    max-height: 60vh;
    overflow-y: auto;
    padding: 1rem;
}

.transitions-popup .transition-item {
    border-bottom: 1px solid #eee;
    padding: 0.5rem 0;
}

.transitions-popup .transition-item:last-child {
    border-bottom: none;
}

.transitions-popup .transition-item h6 {
    margin: 0 0 0.2rem 0;
    font-size: 1rem;
    font-weight: 700;
    color: var(--main-color);
}

.transitions-popup .transition-item small {
    color: #6c757d;
    font-size: 0.8rem;
}

/* Animation */
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

@media (max-width: 576px) {
    .input-group {
        flex-direction: column;
    }
    
    .input-group .form-control {
        border-radius: 0.375rem !important;
        margin-bottom: 0.5rem;
        width: 100%;
    }
    
    .input-group .btn {
        border-radius: 0.375rem !important;
        width: 100%;
    }
    .tracking-container {
        margin: 0 0.25rem;
    }
    .input-header p {
        font-size: 0.7rem;
    }
    .input-help small {
        font-size: 12px;
    }
}