/* ============================================================================
   ORDER HISTORY - Card styling (uses cart-overlay and cart-modal classes)
   ============================================================================ */

.order-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: rgba(50, 50, 93, 0.25) 0px 2px 5px -1px, rgba(0, 0, 0, 0.3) 0px 1px 3px -1px;
    transition: all 0.2s ease;
}

.order-card:hover {
    box-shadow: rgba(50, 50, 93, 0.25) 0px 4px 8px -1px, rgba(0, 0, 0, 0.3) 0px 2px 4px -1px;
}

.order-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
    gap: 12px;
}

.order-title {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}

.order-number {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 14px;
}

.order-status {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
}

.order-status.success {
    background: #e8f7f1;
    color: #00a561;
}

.order-time-badge {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: #f0f0f0;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    color: #666;
    white-space: nowrap;
}

.time-icon {
    font-size: 14px;
}

.time-text {
    color: #c41e3a;
    font-weight: 700;
}

.order-table-info {
    margin-bottom: 12px;
}

.badge-table {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: #f5f5f5;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    color: #666;
}

.order-items {
    margin-bottom: 12px;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    padding: 12px 0;
}

.order-item-detail {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 8px;
    align-items: center;
    font-size: 12px;
    padding: 6px 0;
}

.order-item-detail span:first-child {
    font-weight: 600;
    color: #1a1a1a;
}

.order-item-detail span:nth-child(2) {
    color: #999;
    font-size: 11px;
}

.order-item-detail span:last-child {
    text-align: right;
    color: #c41e3a;
    font-weight: 700;
}

.order-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.order-total {
    font-weight: 700;
    color: #1a1a1a;
    font-size: 13px;
}

.order-total strong {
    color: #c41e3a;
    font-size: 14px;
}

.order-count {
    font-size: 11px;
    color: #999;
    background: #f5f5f5;
    padding: 4px 8px;
    border-radius: 4px;
}

/* Order Action Buttons */
.order-actions {
    display: flex;
    gap: 8px;
    margin-top: 12px;
}

.order-action-btn {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.action-icon {
    font-size: 12px;
}

.reorder-btn {
    flex: 1;
    background: #f0f8ff;
    color: #0066cc;
}

.reorder-btn:hover {
    background: #e0f0ff;
    box-shadow: 0 2px 4px rgba(0, 102, 204, 0.2);
}

.delete-btn {
    flex: 1;
    background: #fff0f1;
    color: #c41e3a;
}

.delete-btn:hover {
    background: #ffe0e6;
    box-shadow: 0 2px 4px rgba(196, 30, 58, 0.2);
}

.orders-footer-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
}

.orders-history-footer {
    padding: 12px 20px;
    border-top: 1px solid #e8e8e8;
    background: #f9f9f9;
    text-align: center;
    flex-shrink: 0;
}

.orders-history-note {
    margin: 0;
    font-size: 12px;
    color: #999;
    font-weight: 500;
}

.clear-all-btn {
    padding: 10px 16px;
    background: #fff0f1;
    color: #c41e3a;
    border: none;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    max-width: 300px;
}

.clear-all-btn:hover {
    background: #ffe0e6;
    box-shadow: 0 2px 4px rgba(196, 30, 58, 0.2);
}

/* Scrollbar styling */
#ordersHistoryContent::-webkit-scrollbar {
    width: 6px;
}

#ordersHistoryContent::-webkit-scrollbar-track {
    background: transparent;
}

#ordersHistoryContent::-webkit-scrollbar-thumb {
    background: #ddd;
    border-radius: 3px;
}

#ordersHistoryContent::-webkit-scrollbar-thumb:hover {
    background: #bbb;
}

/* Mobile optimization */
@media (max-width: 768px) {
    .orders-history-modal {
        width: 100%;
        max-height: 90vh;
        border-radius: 16px 16px 0 0;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-time-badge {
        align-self: flex-end;
    }

    .order-item-detail {
        grid-template-columns: 1fr auto;
    }

    .order-item-detail span:nth-child(2) {
        display: none;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
