/* GreenTap Health - Orders Management Styles */

.orders-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.orders-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e8f5e8;
}

.orders-header h1 {
    color: #2c5f2d;
    font-size: 2.5rem;
    margin-bottom: 10px;
}

.orders-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Orders Controls */
.orders-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.order-filter select {
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
}

.refresh-btn {
    background: #17a2b8;
    color: white;
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.refresh-btn:hover {
    background: #138496;
}

/* Order Cards */
.orders-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-card {
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: all 0.3s ease;
}

.order-card:hover {
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    transform: translateY(-2px);
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-bottom: 1px solid #c3e6cb;
}

.order-info h4 {
    color: #2c5f2d;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.order-date {
    color: #666;
    font-size: 0.9rem;
}

.order-status {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
}

.order-amount {
    font-size: 1.2rem;
    font-weight: bold;
    color: #2c5f2d;
}

/* Status Badges */
.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-created { background: #ffeaa7; color: #2d3436; }
.status-payment_pending { background: #fab1a0; color: #2d3436; }
.status-paid { background: #00cec9; color: white; }
.status-processing { background: #fdcb6e; color: #2d3436; }
.status-shipped { background: #74b9ff; color: white; }
.status-delivered { background: #00b894; color: white; }
.status-cancelled { background: #fd79a8; color: white; }
.status-refunded { background: #a29bfe; color: white; }

.order-content {
    padding: 20px;
}

.order-items {
    margin-bottom: 20px;
    color: #2c5f2d;
}

.order-items p {
    margin: 8px 0;
    line-height: 1.5;
}

.order-items strong {
    color: #2c5f2d;
}

/* Order Actions */
.order-actions {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn {
    padding: 8px 16px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.btn-outline {
    background: white;
    color: #28a745;
    border: 1px solid #28a745;
}

.btn-outline:hover {
    background: #28a745;
    color: white;
}

.btn-primary {
    background: #007bff;
    color: white;
}

.btn-primary:hover {
    background: #0056b3;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #545b62;
}

/* Tracking Information */
.tracking-info {
    background: #e3f2fd;
    padding: 15px;
    margin-top: 15px;
    border-radius: 8px;
    border-left: 4px solid #2196f3;
}

.tracking-info p {
    margin: 5px 0;
    color: #1976d2;
}

.tracking-info strong {
    color: #0d47a1;
}

/* Order Tracking Modal */
.tracking-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-content {
    background: white;
    width: 90%;
    max-width: 600px;
    max-height: 90%;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.modal-header {
    background: linear-gradient(135deg, #2c5f2d 0%, #28a745 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.5rem;
}

.close-modal {
    background: none;
    border: none;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.3s ease;
}

.close-modal:hover {
    background: rgba(255,255,255,0.2);
}

.modal-body {
    padding: 30px;
    max-height: 500px;
    overflow-y: auto;
}

.tracking-status {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px;
    background: #e8f5e8;
    border-radius: 10px;
}

.status-highlight {
    color: #28a745;
    font-size: 1.2rem;
}

.tracking-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.tracking-pending {
    text-align: center;
    padding: 20px;
    background: #fff3cd;
    border-radius: 10px;
    margin-bottom: 30px;
}

/* Timeline */
.tracking-timeline {
    position: relative;
    padding-left: 30px;
}

.tracking-timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: #e9ecef;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
}

.timeline-item.completed .timeline-dot {
    background: #28a745;
    border-color: #28a745;
}

.timeline-item.completed .timeline-content h5 {
    color: #28a745;
}

.timeline-dot {
    position: absolute;
    left: -37px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #e9ecef;
    border: 3px solid #e9ecef;
}

.timeline-content h5 {
    margin: 0 0 5px 0;
    color: #666;
    font-size: 1rem;
}

.timeline-content p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

/* No Orders */
.no-orders {
    text-align: center;
    padding: 60px 20px;
}

.no-orders-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.no-orders h3 {
    color: #2c5f2d;
    margin-bottom: 15px;
}

.no-orders p {
    color: #666;
    margin-bottom: 30px;
}

/* Loading State */
#ordersLoading {
    text-align: center;
    padding: 60px 20px;
    display: none;
}

.loading-spinner {
    display: inline-block;
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #28a745;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

/* Order Notifications */
.order-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border-left: 4px solid #28a745;
    padding: 15px 20px;
    border-radius: 5px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    z-index: 1000;
    animation: slideIn 0.3s ease;
    max-width: 300px;
}

.order-notification.success {
    border-left-color: #28a745;
}

.order-notification.error {
    border-left-color: #dc3545;
}

.order-notification.fade-out {
    animation: slideOut 0.3s ease;
}

/* Responsive Design */
@media (max-width: 768px) {
    .orders-controls {
        flex-direction: column;
        gap: 15px;
    }
    
    .order-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .order-actions {
        justify-content: center;
    }
    
    .modal-content {
        width: 95%;
        margin: 10px;
    }
    
    .modal-body {
        padding: 20px;
    }
    
    .timeline-item {
        margin-bottom: 20px;
    }
    
    .orders-header h1 {
        font-size: 2rem;
    }
}
